Skip to content

SpiritSeal/Pi_Day_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: 7th grade me was an idiot who didn't understand how C# apps work, and that the .sln file did not actually contain the project code. As such, the source code for this project is likely lost :(


Pi_Day_Project

Pi day project 2018-2019

This is the Pi day project that won my Math teacher's Pi day competition on 3/14/19 for pie. I worked with my friend Noah Sehman for the presentation and testing of the program, so a shoutout to him for that!

It is a modified version of the game of NIM:

Instructions:

You begin the game by picking a positive number that corresponds to the digit of pi that you want to start with. For example if you pick '1', your stating digit is '3'. If you pick '2', your number is 1. 3 corresponds to 4 and so on for the digits of pi (3.1415...) The next number that you pick is the number of digits long you want your starting number to be. So if you pick '1' as your first number and '3' as your second number, your starting number becomes 314. Once you have your starting digit, you and the AI take turns subtracting numbers from from your starting number

  • Think of it as having some number of marbles, and you and your opponent take turns removing marbles from the the center. The person who takes the last marble wins The catch is that you and your opponent can only subtract 3, 1, or 4 marbles during your turn (get it? 3.14)

AI Legend Nanda (named after the my school's Legendary Math teacher, Mr. Surjit Nanda, who teaches Algebra II through a combination of Butter Chicken, Michael Jackson, and this) is your opponent. He is mathematically unbeatable.

A note about the files included in this GitHub repository

  • The .exe is the compiled version of the code. It is a text-based command line program, so keep that in mind when you run it.
  • The .sln is the .NET C# Visual Studio code file. Feel free to open it up to see how the AI works!

Releases

No releases published

Packages

No packages published

Languages