GithubHelp home page GithubHelp logo

hangman's Introduction

project5

Evil hangman, a game of hangman where the computer secretly changes the word to defeat the human player

features

  • The game of hangman
  • A secretly cheating computer system
  • live computer monologue

Frameworks Languages & libraries

  • java
  • android sdk

Models

  • Hangman: a model that does all of the backend needed to play the game of hangman (class vars are saved local) also contains game settings
  • HiScores: a model that makes a hightscore list and saves it to the local memory

Model Classes (code design)

Hangman

Class: Hangman()

Class var: String playerName

Class var: int wordLength

Class var: int tries

Const Class var: Array userInputStates

Class var: Array wordList

Class var: String currentWord

Class var: String currentWordState = "_A__B_"

Class var: String usedLetters

Class var: String computerMonologue

Method: initList()

  • // sets the list array with all the possible words

Method: chooseRandomnWord(wordLength)

  • // picks a psuedo randomn word from the list by set length

Method: doUserInput(letter)

  • // already used
  • // invalid input
  • // wrong guess
  • // correct guess

Method: getCurrentWord()

  • // gets the word that has been picked to play with

Method: getCurrentWordState()

  • // gets the state of the word ("_A_BC_")

Method: getUsedLetters()

  • // gets the used letters

Method: getComputerMonologue()

  • // gets current computer monologue switch that checks witch one to pick

Method: reset()

  • // resets the game

HiScores

Class: HiScores

Class var: ArrayList scores

  • // the constructor will retrieve the scores

Class var: Array top10

Method: addScore()

  • // adds a score to the scores arraylist

Method: getTop10()

  • // gets the top 10 from the scores list

Images

Schets van het scherm waar hangman in gespeeld word: ![Game screen](doc/Opzet interface.JPG)

Opzet classes evil hangman (niet meer nodig): ![Classes](doc/Poging tot class.JPG)

Design doc

https://moqups.com/svandenhout/RbfktZxW

hangman's People

Contributors

svandenhout avatar

Watchers

 avatar  avatar

hangman's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.