Skip to content

yesyayen/RedditDailyProgrammerChallenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Reddit Daily Programmer Challenge

My solution for Challenge #159 in subreddit /r/dailyprogrammer/ RPSLP

Rock-paper-scissors-lizard-Spock is an expansion of the classic selection method game rock-paper-scissors. It operates on the same basic principle, but includes two additional weapons: the lizard and Spock (formed by the Star Trek Vulcan salute). This reduces the chances of a round ending in a tie (from 1/3 to 1/5).

RPSLP.java

Question : http://www.reddit.com/r/dailyprogrammer/comments/23lfrf/4212014_challenge_159_easy_rock_paper_scissors/

Computer randomly pick their move and the game goes on till user quits. Following stats are recoreded and displayed at the end of the game

  • Total Games played
  • Computer Wins (Number and percentage)
  • Human Wins (Number and percentage)
  • Ties (Number and Percentage)

RPSLP_AI.java

Question : http://www.reddit.com/r/dailyprogrammer/comments/23qy19/4232014_challenge_159_intermediate_rock_paper/

Computer rather picking randomly, it uses frequency analysis, the program simply identifies the most frequently played move by the user and picks a counter move.

About

Solution for Reddit Daily Programmer Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors