All pastes #716742 Raw Edit

GameSystem

public text v1 · immutable
#716742 ·published 2007-09-27 03:09 UTC
rendered paste body

/**
 * The core of the Hangman game
 * 
 * @author Leon Traill
 * @version 0.01
 */
public class GameSystem
{
    private Dictionary dictionary;
    private Word word;
    public String currentWord;

    public static void main(String[] args)
    {
        GameSystem game = new GameSystem();
    }
    
    public GameSystem()
    {
        dictionary = new Dictionary();
        word = new Word();
    }
    
    public void startGame()
    {
        // Call methods to display the number of dashes for a word, round number, text saying "Game started"
        // Gui.draw();
        System.out.println("******** GAME HAS STARTED ********");
        dictionary.readDictionaryFile();
        // Assign current word to a variable
        currentWord = dictionary.chooseNewWord();
        word.wordToConvert = currentWord;
        
        System.out.println("Current word: " + currentWord);
        System.out.println("Word number: " + dictionary.wordCount);
    }
    
    public void endGame()
    {
        // End game based on number of rounds (10)
        System.out.println("******** GAME HAS ENDED ********");
        //CurrentScore();
    }
    
    public void currentScore()
    {
        // Keep count of score, based on win or lose
    }

}