Skip to content

ningowo/Mini-Programs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Mini-Programs

1. The game of pig

The game of Pig is a simple two-player dice game in which you compete with computer to reach 100 points to wins. Players take turns. On each turn, a player rolls a six-sided die:

  • If the player rolls a 1, then the player gets no new points and it becomes the other player’s turn.

  • If the player rolls 2 through 6, then he or she can either:

    ROLL AGAIN or

    HOLD. (The sum of all rolls is added to the player’s score, and it becomes the other player’s turn.)

2. Tic-Tac-Toe

I think my program is really simple and concise :)

Write a program that will allow two users to play tic-tac-toe. The program should ask for moves alternately from player X and player O. The players enter their moves by entering the position number they wish to mark. After each move, the program displays the changed board. A sample board con-figuration is

X X O

4 5 6

O 8 9

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages