home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
TicTacToe_MainMenu.srm
< prev
next >
Wrap
Text File
|
1997-09-30
|
4KB
|
193 lines
$PBExportHeader$tictactoe_mainmenu.srm
$PBExportComments$Generated by ObjectTeam
forward
global type tictactoe_mainmenu from menu
end type
type game from menu within tictactoe_mainmenu
end type
type new from menu within game
end type
type game from menu within tictactoe_mainmenu
new new
end type
type opponent from menu within tictactoe_mainmenu
end type
type human from menu within opponent
end type
type computer_x from menu within opponent
end type
type computer_o from menu within opponent
end type
type opponent from menu within tictactoe_mainmenu
human human
computer_x computer_x
computer_o computer_o
end type
end forward
shared variables
// User defined attributes
// Non modeled user defined attributes
end variables
global type tictactoe_mainmenu from menu
game game
opponent opponent
end type
global tictactoe_mainmenu tictactoe_mainmenu
type variables
// User defined attributes
// Association attributes
// Non modeled user defined attributes
// Control to class mappings
// tictactoe_mainmenu --> TicTacToe_MainMenu
// game --> TicTacToe_GameMenu
// new --> TicTacToe_New
// opponent --> TicTacToe_OpponentMenu
// human --> TicTacToe_Opponent
// computer_x --> TicTacToe_Opponent
// computer_o --> TicTacToe_Opponent
end variables
on tictactoe_mainmenu.create
tictactoe_mainmenu=this
this.game=create game
this.opponent=create opponent
this.Item[]={ this.game,&
this.opponent}
this.Text = "TicTacToe_MainMenu"
end on
on tictactoe_mainmenu.destroy
destroy(this.game)
destroy(this.opponent)
end on
type game from menu within tictactoe_mainmenu
new new
end type
on game.create
this.new=create new
this.Item[]={ this.new}
this.Text = "&Game"
this.Microhelp = "new game"
end on
on game.destroy
destroy(this.new)
end on
type new from menu within game
end type
on new.create
this.Text = "&New~tCtrl+N"
this.Shortcut = 334
end on
event clicked;//
tictactoe_gui gui
gui = ParentWindow
tictactoe_game game
tictactoe_computer computer
game = gui.game
computer = gui.computer
game.startGame()
computer.checkturn()
end event
type opponent from menu within tictactoe_mainmenu
human human
computer_x computer_x
computer_o computer_o
end type
on opponent.create
this.human=create human
this.computer_x=create computer_x
this.computer_o=create computer_o
this.Item[]={ this.human,&
this.computer_x,&
this.computer_o}
this.Text = "&Opponent"
end on
on opponent.destroy
destroy(this.human)
destroy(this.computer_x)
destroy(this.computer_o)
end on
type human from menu within opponent
end type
on human.create
this.Text = "&Human~tCtrl+H"
this.Checked = true
this.Shortcut = 328
end on
event clicked;//
parent.human.Checked = TRUE
parent.computer_x.Checked = FALSE
parent.computer_o.Checked = FALSE
tictactoe_gui gui
tictactoe_computer computer
gui = ParentWindow
computer = gui.computer
computer.id = ''
computer.checkturn()
end event
type computer_x from menu within opponent
end type
on computer_x.create
this.Text = "Computer &X~tCtrl+X"
this.Shortcut = 344
end on
event clicked;//
parent.human.Checked = FALSE
parent.computer_x.Checked = TRUE
parent.computer_o.Checked = FALSE
tictactoe_gui gui
tictactoe_computer computer
gui = ParentWindow
computer = gui.computer
computer.id = 'X'
computer.checkturn()
end event
type computer_o from menu within opponent
end type
on computer_o.create
this.Text = "Computer &O~tCtrl+O"
this.Shortcut = 335
end on
event clicked;//
parent.human.Checked = FALSE
parent.computer_x.Checked = FALSE
parent.computer_o.Checked = TRUE
tictactoe_gui gui
tictactoe_computer computer
gui = ParentWindow
computer = gui.computer
computer.id = 'O'
computer.checkturn()
end event