User Tools

Site Tools


a_2048_gui

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
a_2048_gui [2026/02/06 14:02] – [A GUI Example] frchrisa_2048_gui [2026/02/06 14:06] (current) – [Additional Methods For the Game2048 class] frchris
Line 4: Line 4:
  
 ===== Additional Methods For the Game2048 class ===== ===== Additional Methods For the Game2048 class =====
-In order for the GUI client to present the board you need to write accessor some methods in the ''Game2048'' class: +In order for the GUI client to present the board,  you need to make some accessor methods in the ''Game2048'' class: 
-  ''public int getScore()'' returns the score.   +  ''public int getScore()'' returns the score.   
-  ''public int[][] getBoard()'' returns the gameBoard. +  ''public int[][] getBoard()'' returns the gameBoard. 
-  ''public int max()'' returns the maximum element of the gameBoard.    +  ''public int max()'' returns the maximum element of the gameBoard.    
  
 ===== Implementing Scoring ===== ===== Implementing Scoring =====
a_2048_gui.txt · Last modified: by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki