Index_G


G

Game class, 417–420

game examples. See programs

Game Over 2.0 program example, 18–19

Game Over program example, 2

game_over() method, 371, 417

Games_Object class, 350

constructor parameters, 426

methods, list of, 351, 426–427

get() method, 150–151, 250

dictionaries, 155

radio buttons, 329

text values, 320

get_angle() method, 427

get_angular_speed() method, 427

get_bbox() method, 426

get_bottom() method, 351, 426

get_left() method, 351, 368, 426

get_pos() method, 351, 426

get_right() method, 351, 368, 426

get_text() method, 428

get_top() method, 351, 426

get_value() method, 290

get_velocity() method, 351, 426

get_xpos() method, 351, 426

get_ypos() method, 351, 426

global constants, 342

Global Reach program example, 179–180

global variables, 181–182

Granted or Denied program example, 61–62

graphical user interface. See GUI

graphics

background images, 343–345

coordinate systems, 345–346

graphics window, creating, 340–343

messages, displaying, 348–350

pixels, 342

text, displaying, 346–348

greater than operator, 59

greater than or equal to operator, 59

Geek Translator program example, 147

Greeter program, 33, 36

grid() method, 308

column parameter, 318

columnspan parameter, 318

row parameter, 318

sticky parameter, 319

Guess My Number game example

congratulating players, 88

description of, 54

game exit, 88

game explanation, 87

guessing loop, creating, 87–88

initial comment block, creating, 86–87

initial values, setting, 87

program plan, 85–86

random numbers, 54–57, 87

GUI (graphical user interface), 307–308

buttons, 309–311

check, 322–326

click count, 314–316

creating, 310

radio, 326–329

collision detection, 363–366

creating, using classes, 311–314

event-driven programming, 302–304

event handlers, 314–316

mouse input, 360–363

overview, 301–302

root window, 304–306

screen boundaries, 358–360

sprites

creating, 356

init_sprite() method, 353

loading images from, 354–355

moving, 356–358

overview, 350–351

uses for, 352

text-based widgets, 316–321

Tkinter toolkit, 302




Python Programming for the Absolute Beginner
Python Programming for the Absolute Beginner, 3rd Edition
ISBN: 1435455002
EAN: 2147483647
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net