Randomly give you and the computer two cards,comparing the color and number with the computer, the bigger one win!
- If both of you and computer got a "offsuit", comparing the biggest in your and the computer, who has bigger one who win.
Example:
I got : ♠5 ♠A and the computer got : ♠9 ♥7,I wins.
I got : ♥2 ♠5 and the computer got : ♠7 ♣9 ,the computer wins.
but if both of you and computer got one same number card, tie.
Example:
I got : ♣10 ♠A and the computer got : ♥7 ♠A ,tie.
- If both of you and computer got a "pair", comparing number of the cards, who has bigger one who win.
Example:
I got : ♦Q ♣Q and the computer got : ♥8 ♣8 ,I win.
- If both of you and computer got a "pair" with same number, comparing color of the cards, who has bigger one who win.
Example:
I got : ♦10 ♥10 and the computer got : ♥K ♣K ,the computer wins.
- If one of you got a "pair",another did not, the one who got a pair who win.
Example:
I got : ♣6 ♠6 and the computer got : ♠4 ♥9 ,I win.
I got : ♦5 ♥K and the computer got : ♣K ♥K ,the computer wins.
JavaSE 1.8
JRE 1.8.0_171
Win 10
Eclipse
Setting run configuration encoding UTF-8
MIT Lisence