Author Topic: Board GCF  (Read 3300 times)

0 Members and 1 Guest are viewing this topic.

Offline program4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +15/-0
    • View Profile
Board GCF
« 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.
« Last Edit: February 07, 2011, 06:37:59 pm by program4 »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Board GCF
« Reply #1 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?

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Board GCF
« Reply #2 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.

Offline program4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +15/-0
    • View Profile
Re: Board GCF
« Reply #3 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.   :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Board GCF
« Reply #4 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)

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Board GCF
« Reply #5 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.

Offline program4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +15/-0
    • View Profile
Re: Board GCF
« Reply #6 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.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Board GCF
« Reply #7 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

Offline program4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +15/-0
    • View Profile
Re: Board GCF
« Reply #8 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.
« Last Edit: March 15, 2011, 09:16:47 pm by program4 »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Board GCF
« Reply #9 on: March 14, 2011, 09:07:56 pm »
Nice to see some new updates and optimizations. :D