User Tools

Site Tools


joust

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
joust [2020/04/10 17:15] frchrisjoust [2020/04/10 17:16] frchris
Line 11: Line 11:
  
 ====== Under the hood ====== ====== Under the hood ======
-  - The ''Joust'' class is a control class that handles the user's activity.  If the user is hovering over a valid move, then that particular ''Square'' is told it is highlighted.  If the user clicks on a valid move, then the current ''Knight'' burns the current square, and is moved to the new location. If it is not a game winning move, the current player switches to the other knight.  +  - The ''Joust'' class is a control class that handles the user's activity.  If the user is hovering over a valid move, then that particular ''Square'' is told it is highlighted.  If the user clicks on a valid move, then the current ''Knight'' burns the current square, and is moved to the new location. If it is not a game winning move, the current player switches to the other knight. If it is a victory for some one, a reset button is shown to start a new game. 
   - ''Square'' objects start out either black or white (like a chess board) and become red when they are "burned" It draws itself, so it needs to know if it is highlighted. Write the ''isBurned'' method by checking what the color is. If you like, you can change the actual Colors used for black, white and burned squares.   - ''Square'' objects start out either black or white (like a chess board) and become red when they are "burned" It draws itself, so it needs to know if it is highlighted. Write the ''isBurned'' method by checking what the color is. If you like, you can change the actual Colors used for black, white and burned squares.
   - Each player is a ''Knight'' (the player's piece) which needs to keep track of its location, what color it is. If you want to have other pieces, you can see how the knight icon is a unicode character.  You can modify that if you wish with a different one [[https://www.chessvariants.com/d.font/unicode.html]]   - Each player is a ''Knight'' (the player's piece) which needs to keep track of its location, what color it is. If you want to have other pieces, you can see how the knight icon is a unicode character.  You can modify that if you wish with a different one [[https://www.chessvariants.com/d.font/unicode.html]]
joust.txt · Last modified: 2020/04/10 17:22 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki