Author Topic: [Lua] Mancala  (Read 19037 times)

0 Members and 2 Guests are viewing this topic.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
[Lua] Mancala
« on: January 06, 2012, 07:24:19 pm »
I'm making mancala and in color for my first lua project  :w00t:

I've got about 100 lines done so far, but I don't have any screenshots because I haven't made the game board since I heard ti image is extremely slow, and I fail at using drawing with drawRect, drawArc, etc.

Here it is on wikipedia if you're unfamiliar with the game.

I just started yesterday, so there isn't that much to post about it yet :P

Once I'm able to find a way to make the game board, I'll add some screenies of The Game :)
« Last Edit: January 09, 2012, 08:41:44 pm by epic7 »

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: [Lua] Mancala
« Reply #1 on: January 06, 2012, 09:49:30 pm »
FillRect/FillArc isn't that hard. You just have to keep on trying different stuff on the emulator. Good luck on the project!

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: [Lua] Mancala
« Reply #2 on: January 06, 2012, 09:59:59 pm »
I'll just spend the night testing random stuff hopefully to some success :P

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: [Lua] Mancala
« Reply #3 on: January 06, 2012, 10:21:15 pm »
Good luck Epic! wow first lua game! Fun stuff :) Can't wait to see it in action!
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: [Lua] Mancala
« Reply #4 on: January 06, 2012, 10:59:00 pm »
THank you SO MUCH epic7 I LOVVVVVVEEEEEEEEEEE Mancala
This used to contain a signature.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: [Lua] Mancala
« Reply #5 on: January 06, 2012, 11:09:13 pm »
Ok, I started making the mancala board. Here what it's looking like so far:

« Last Edit: January 06, 2012, 11:10:21 pm by epic7 »

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: [Lua] Mancala
« Reply #6 on: January 06, 2012, 11:16:55 pm »
cool, this will be fun, even though ive only played it once or twice :p
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: [Lua] Mancala
« Reply #7 on: January 07, 2012, 12:04:35 am »
can I have a demo?
This used to contain a signature.

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: [Lua] Mancala
« Reply #8 on: January 07, 2012, 02:51:32 am »
looks good epic7, seems that you managed to get every rect/arc on its place :)

and the colors are quite realistic, i like it

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Lua] Mancala
« Reply #9 on: January 07, 2012, 05:46:04 am »
Great :)

Don't forget to share your code so we can help you on it if you have troubles or if we think you can optimize it :)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: [Lua] Mancala
« Reply #10 on: January 07, 2012, 09:33:33 am »
Good job, epic7! The boring testing is what you have to do sometimes.  :P

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: [Lua] Mancala
« Reply #11 on: January 09, 2012, 08:07:35 pm »
Here all the rules, do these sound good?

1.At the beginning of the game, three seeds are placed in each house.

 2.Each player controls the six houses and their seeds on his side of the board. His score is the number of seeds in the store to his right.

 3.Players take turns sowing their seeds. On a turn, the player removes all seeds from one of the houses under his control. Moving counter-clockwise, the player drops one seed in each house in turn, including the player's own store but not his opponent's.

 4.If the last sown seed lands in the player's store, the player gets an additional move. There is no limit on the number of moves a player can make in his turn.

 5.If the last sown seed lands in an empty house owned by the player, and the opposite house contains seeds, both the last seed and the opposite seeds are captured and placed into the player's store.

 6.When one player no longer has any seeds in any of his houses, the game ends. The other player moves all remaining seeds to his store, and the player with the most seeds in his store wins.

Should I keep rule 6? Rule 6 is sometimes not used in mancala.

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: [Lua] Mancala
« Reply #12 on: January 09, 2012, 08:11:07 pm »
I've personally never played with rule 5, but if that's official, then that'd probably be a good idea. I think rule 6 is probably good.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: [Lua] Mancala
« Reply #13 on: January 09, 2012, 08:14:41 pm »
Actually, I've never played with rule 5 either. A variation wiki lists is to only capture the one seed that landed in the empty house.

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: [Lua] Mancala
« Reply #14 on: January 09, 2012, 08:16:48 pm »
I use rule 5
This used to contain a signature.