Quantcast
Channel: Rock, Paper, Scissors 3-part - Code Review Stack Exchange
Browsing latest articles
Browse All 3 View Live

Answer by dwjohnston for Rock, Paper, Scissors 3-part

I'm going to suggest you use a two dimension array look up to determine the win lose matrix. //-1 = user loses// 0 = tie // 1 = user winsint[][] winArray = new int[ [0, -1, 1], [1, 0,-1], [-1, 1, 0] ];...

View Article



Answer by Eric Stein for Rock, Paper, Scissors 3-part

NamingJava classes start with a capital letter and do not use underscores, so rock_paper should be RockPaper. Java uses camelCase, not snake_case, for all variable names except constants (static...

View Article

Rock, Paper, Scissors 3-part

Write a program that lets a user play "Rock, Paper, Scissors" against the computer. The program should ask the user to choose one of the three choices, and then the computer randomly picks one (without...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images