Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: program4 on February 04, 2011, 07:55:59 pm

Title: Board GCF
Post by: program4 on February 04, 2011, 07:55:59 pm
TI-BASIC is the only language I can program in, so this is a TI-BASIC program.  :P

Anyways, Board GCF a kind of strategy/math board game where you play against the calculator.

Scoring is as follows: the GCF of the number selected and the number last selected by the other person (or calc). So, if you choose 32, and the calculator chooses 48, the calc gets 16 points, and if you then choose 72, you get 24 points.

However, since the calculator seems really easy to beat, it gets twice the points (or 3x on Extreme mode), so instead of getting 16 points, the calculator gets 32 (or 48).

The game ends when the board is cleared.
Title: Re: Board GCF
Post by: DJ Omnimaga on February 05, 2011, 03:44:24 am
Hmm I don't really understand. Basically is it some sort of chance game where the person who select the highest number scores?
Title: Re: Board GCF
Post by: jnesselr on February 05, 2011, 11:36:36 am
This is strange, but complicated.

Spoiler For HINT:
Use Prime numbers wisely, as their only factor is 1 with any other number, and would only increase your opponents score by 1.
Title: Re: Board GCF
Post by: program4 on February 06, 2011, 05:17:03 pm
@DJ Omnimaga: The game is more strategy than chance. Here's an example if you are confused (for simplicity, I'll use a 3*3 instead of 5*5 board and the calculator's score will not double):

12 23 96
32 69 55
15 1  8

Scores: You-0 Calculator-0

Say you pick 8. Then, the calculator might pick 32. Then, 8 and 32 are gone from the board:

12 23 96
    69 55
15 1  8

Scores: You-0 (since there is no previously selected number) Calculator-8 (since the GCF of 8 and 32 is 8)

Oh, and I forgot to say, the number at the last row of the screen is the last selected number.

Say you pick 96.

12 23
    69 55
15 1  8

Then, you would have 32 points, since the GCF of 32 (the number last selected) and 96 is 32.

Say the calculator picks 12.

    23
    69 55
15 1  8

Scores: You-32 Calculator- 8+gcf(96,12)=20

Then, you pick 23 and the calc picks 1.

    69 55
15     8

Scores: You- 32+gcf(23,12)=33 Calculator- 20+gcf(23,1)=21

And so on. I hope this clarifies the object of the game.   :)
Title: Re: Board GCF
Post by: DJ Omnimaga on February 08, 2011, 12:02:47 am
Mhmm I see, although it doesn't help much that I have no clue what is a GCF (I know the acronym, but I am confused at how that works)
Title: Re: Board GCF
Post by: jnesselr on February 08, 2011, 07:21:31 am
Mhmm I see, although it doesn't help much that I have no clue what is a GCF (I know the acronym, but I am confused at how that works)
So, say I have two numbers, 198 and 54.  Given their prime factors, you get:
2*3*3*11=198
2*3*3*3=54
Now, of those two numbers, they each have one 2 and they each have two 3.  So, the GCF of 198 and 54 equals 2*3*3.
Title: Re: Board GCF
Post by: program4 on February 08, 2011, 07:51:55 pm
In words, the GCF of two numbers is the largest integer that evenly divides both numbers. Like graphmastur's example, the largest integer that divides evenly into 198 and 54 is 18. (54/18=3 and 198/18=11). Any integer larger than 18 would not divide evenly into both 198 and 54.
Title: Re: Board GCF
Post by: DJ Omnimaga on February 14, 2011, 12:18:36 am
Hmm I see. It has been almost a decade since I last had math classes, so a lot of that stuff is gibberish to me, not to mention I am visual. X.x
Title: Re: Board GCF
Post by: program4 on March 13, 2011, 11:09:46 am
Board GCF v1.4

*Optimizations! (lots of them- I can't believe how unoptimized my previous version was :P)
*Less labels
*Much faster "Easy" opponent (though the same difficulty)

The option to turn the calculator off (pause) was present in the first version, but I forgot to include the file. Just make a program like this:

PROGRAM:_theta_CALCOFF
:AsmPrgm3E01D303FB76FDCB09A6C9


And, during the game (or the menu), press [MODE] to turn the calculator off.
Title: Re: Board GCF
Post by: DJ Omnimaga on March 14, 2011, 09:07:56 pm
Nice to see some new updates and optimizations. :D