Difference between revisions of "Teams Winter 2011/team4/lab4"

From CDOT Wiki
Jump to: navigation, search
Line 5: Line 5:
 
==Tutorial==
 
==Tutorial==
 
===Create BlackBerry Project===
 
===Create BlackBerry Project===
===Change Project Icon and Output Name===
+
*Download and install BlackBerry Java Plug-in for Eclipse
 +
*Repeat the above for BlackBerry Torch 9800 simulator
 +
*Launch Eclipse
 +
*Create new BlackBerry Project: ''File->New->BlackBerry Project''
 +
*Set the title of the project
 
===Add Elements on Main Screen===
 
===Add Elements on Main Screen===
===Add Menu to the Application===
+
*Place a applications icon into ''res->image''
===Add Elements to View Screen===
+
*Open ''BlackBerry_App_Descriptor''
===Add Elements to Add Screen===
+
*Select the icon, click the ''Add'' button
===Implement Delete Student Option===
+
*Select the ''Build'' tab and set the name of the application
===Implement Edit Student Option===
+
===Define the Application===
===Add Send E-mail Option===
+
*Create the classes StartScreen, PlayerOne, and PLayerTwo
 +
*StartScreen will setup the environment for our application
 +
*Both Player classes will contain the code for what is to be displayed per the respective players turn
 +
*After the player makes a move, the screens will swap and the other player will take their turn while their screen is currently showing
 +
===Starting the Game===
 +
*Implement the code to create the menu
 +
*Add a start game button
 +
*Add a exit game button
 +
*Allow the start game button to switch screens
 +
===Creating the Player===
 +
*Create the player constructor
 +
*Implement the ability for a ''player'' to take their turn
 +
*Allow the game to switch players after a turn
 +
*When the players screen is displayed is it considered their turn
 +
===Ending the Game===
 +
*Within the player classes, implement terminal state checking
 +
*Before a players move, is there space to go?
 +
**No, the game is over directing the player to the main screen
 +
**Yes, the game is not over and the player may take their turn
 +
*After a players move, does that that move win the game?
 +
**No, the game is not over and the next ''player's'' screen is displayed
 +
**Yes, the game is over directing the player to the main screen

Revision as of 23:35, 26 March 2011

Lab 3


Tutorial

Create BlackBerry Project

  • Download and install BlackBerry Java Plug-in for Eclipse
  • Repeat the above for BlackBerry Torch 9800 simulator
  • Launch Eclipse
  • Create new BlackBerry Project: File->New->BlackBerry Project
  • Set the title of the project

Add Elements on Main Screen

  • Place a applications icon into res->image
  • Open BlackBerry_App_Descriptor
  • Select the icon, click the Add button
  • Select the Build tab and set the name of the application

Define the Application

  • Create the classes StartScreen, PlayerOne, and PLayerTwo
  • StartScreen will setup the environment for our application
  • Both Player classes will contain the code for what is to be displayed per the respective players turn
  • After the player makes a move, the screens will swap and the other player will take their turn while their screen is currently showing

Starting the Game

  • Implement the code to create the menu
  • Add a start game button
  • Add a exit game button
  • Allow the start game button to switch screens

Creating the Player

  • Create the player constructor
  • Implement the ability for a player to take their turn
  • Allow the game to switch players after a turn
  • When the players screen is displayed is it considered their turn

Ending the Game

  • Within the player classes, implement terminal state checking
  • Before a players move, is there space to go?
    • No, the game is over directing the player to the main screen
    • Yes, the game is not over and the player may take their turn
  • After a players move, does that that move win the game?
    • No, the game is not over and the next player's screen is displayed
    • Yes, the game is over directing the player to the main screen