This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
biggest yikes's profile picture

War! The Classic Card Game

Started by biggest yikes, 24 January 2014 - 08:13 AM
biggest yikes #1
Posted 24 January 2014 - 09:13 AM
So, I have created a game called War, as in the card game, in Lua. It's mainly a text war, but its obsessive to play.
Here's how to play War if you don't know it yet. You place down a card (and the other person) and whoever has the highest card wins both cards. If they are the same, you are in a War. You place down 3 cards (double wars 6) and whoever wins now gets an extra 3 cards, plus the 1 that lost. If you get another war, you have a double war (you place another 3 cards down, and win 8 [or 7 I can't remember] who wins. At least in this version it is.)

Now to the good stuff! If I can I'll post all my screenshots I have (don't expect much; I don't really get how) I'll post em'.
If you want sound, on the right side on the computer put a note block with the sound you want it to play every session. Place a note block on the back of the computer and that will play every war.

Here's the download: pastebin get WEW0NKpY war
pastebin.com/WEW0NKpY
BUGS FIXED:
-Wars are ignored
-Generic sound is same as War sound
-Wars would add the start cards plus one, making when you get a war the person who wins that war wins the entire game
If it expires, tell me and I'll fix it ;)/>

OLD VERSIONS:
pastebin get TtedahBK war
http://pastebin.com/TtedahBK
pastebin get dCW1kKqW war
http://pastebin.com/dCW1kKqW



Sorry if its a bit small, the shots :P/>
Try clicking on them.

[attachment=1454:NormalThing.png]
[attachment=1453:WinWar.png]
[attachment=1451:AceWar.png]
[attachment=1450:DoubleWar.png]
Edited on 10 September 2014 - 10:42 PM
Agoldfish #2
Posted 24 January 2014 - 10:05 AM
Did you make this on Grim's server? :P/>
Anyway, nice game. I remember playing this game growing up all the time. It never lost its charm.
biggest yikes #3
Posted 24 January 2014 - 03:05 PM
Did you make this on Grim's server? :P/>
Anyway, nice game. I remember playing this game growing up all the time. It never lost its charm.
I made about 1/4th of this game on Grim's server.
Most of it was on single-player, imported on the server.
And thanks! :D/>
Edited on 24 January 2014 - 06:15 PM
biggest yikes #4
Posted 24 January 2014 - 07:15 PM
50 Views…I guess this must've been a popular game (kinda) then..
Edited on 24 January 2014 - 06:16 PM
TheOddByte #5
Posted 30 January 2014 - 12:54 PM
Hmm.. This seems very interesting.
Maybe you should try to add some ascii art to it? Anyway, Good job! :D/>
biggest yikes #6
Posted 31 January 2014 - 04:10 PM
Hmm.. This seems very interesting.
Maybe you should try to add some ascii art to it? Anyway, Good job! :D/>
I don't know how to add ASCII or what to determine to make it.
Thanks however!
Agoldfish #7
Posted 22 February 2014 - 02:28 PM
Did you use math.random to generate the cards?
Also, you should factor putting two cards down when you go to war. ;)/>
biggest yikes #8
Posted 23 February 2014 - 03:20 PM
Did you use math.random to generate the cards?
Also, you should factor putting two cards down when you go to war. ;)/>
Of course I used math.random, what else?
By the way, Don't tell me that it's not random technically, because I know.
Also, I apologize, but I don't understand what you mean by 'you should factor putting two cards down when you go to war'.
Agoldfish #9
Posted 23 February 2014 - 03:43 PM
Did you use math.random to generate the cards?
Also, you should factor putting two cards down when you go to war. ;)/>
Of course I used math.random, what else?
By the way, Don't tell me that it's not random technically, because I know.
Also, I apologize, but I don't understand what you mean by 'you should factor putting two cards down when you go to war'.
They way /my/ family played was, when we had two of the same card, we put two face down to make it more interesting when it came to winning wars.
biggest yikes #10
Posted 24 February 2014 - 03:27 PM
Did you use math.random to generate the cards?
Also, you should factor putting two cards down when you go to war. ;)/>
Of course I used math.random, what else?
By the way, Don't tell me that it's not random technically, because I know.
Also, I apologize, but I don't understand what you mean by 'you should factor putting two cards down when you go to war'.
They way /my/ family played was, when we had two of the same card, we put two face down to make it more interesting when it came to winning wars.
That's a good idea. Now that I think about it, I'll add an option to effect that.
Keep in mind this is nowhere near the full thing, and even then, complete, so there's plenty good in that :)/>
biggest yikes #11
Posted 24 February 2014 - 03:48 PM
Did you use math.random to generate the cards?
Also, you should factor putting two cards down when you go to war. ;)/>
Of course I used math.random, what else?
By the way, Don't tell me that it's not random technically, because I know.
Also, I apologize, but I don't understand what you mean by 'you should factor putting two cards down when you go to war'.
They way /my/ family played was, when we had two of the same card, we put two face down to make it more interesting when it came to winning wars.
That's a good idea. Now that I think about it, I'll add an option to effect that.
Keep in mind this is nowhere near the full thing, and even then, complete, so there's plenty good in that :)/>
Updated to add that and local variables :D/>
Agoldfish #12
Posted 24 February 2014 - 03:50 PM
Why aren't the functions localized?
EDIT: Why not make the noteblock sides configurable. ;o
Edited on 24 February 2014 - 03:44 PM
biggest yikes #13
Posted 24 February 2014 - 06:22 PM
Why aren't the functions localized?
EDIT: Why not make the noteblock sides configurable. ;o
The new update localized it.
And I guess I could do that..But it's getting pretty late. Will do that tomorrow :D/>
Edited on 24 February 2014 - 05:22 PM
crazyadam0 #14
Posted 24 February 2014 - 06:40 PM
This is pretty cool, and It's a really fun card game, but you don't really play the game, just watch the simulation go. It would be a little cooler if you could reduce the time between plays and make the user click a image of a deck or something? Some way to add user interaction would make it much more fun.
Edited on 24 February 2014 - 05:40 PM
Agoldfish #15
Posted 25 February 2014 - 09:31 AM
Why aren't the functions localized?
EDIT: Why not make the noteblock sides configurable. ;o
The new update localized it.
And I guess I could do that..But it's getting pretty late. Will do that tomorrow :D/>
You sure?
Spoiler
biggest yikes #16
Posted 26 February 2014 - 12:15 AM
Why aren't the functions localized?
EDIT: Why not make the noteblock sides configurable. ;o
The new update localized it.
And I guess I could do that..But it's getting pretty late. Will do that tomorrow :D/>
You sure?
Spoiler
I thought you meant the variables, sorry about that :P/>
I'll try (try? you mean do?) to fix that aswell as those configurable sides to the noteblocks.

This is pretty cool, and It's a really fun card game, but you don't really play the game, just watch the simulation go. It would be a little cooler if you could reduce the time between plays and make the user click a image of a deck or something? Some way to add user interaction would make it much more fun.
If you mean click the image, I clearly can't make an image, but I can make the user have to click on something to continue :)/>
I'll add that before I update it aswell.
EDIT: Updated with all the promised features! :)/>
Edited on 25 February 2014 - 11:50 PM