Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

The Guillotine card game written in the C language

a personal project

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1 Yuriy M

Yuriy M

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 126 posts

Posted 30 March 2014 - 05:13 PM

Hi guys.  :) 

 

From my years of programming in C, I have tackled a personal hobby project which involves writing a C version of the Guillotine card game. For those who you who don't know, Guillotine is a card game designed by Paul Peterson to which its theme is based on the French Revolution. The object of the game is to collect the heads of nobles and rack up the highest points possible.

 

Gameplay is 2 to 5 players and the layout involves a noble deck to which new nobles are drawn for the guillotine line and an action deck where players can draw and play action cards that can affect the outcome of a player's score or the guillotine line. The game is divided into three rounds or "days". Each day, twelve nobles are dealt face-up in a row to be executed. A player's turn consists of playing an action card (optionally), collecting the noble card at the front of the line, and drawing an action card from the deck.

 

Some nobles have special effects attached to them. For example, the Robespierre card automatically ends the day when the player collects the noble, Fast Noble automatically lets the player collect the next noble following Fast Noble and The Clown allows the player collecting the noble to give the noble to another player, thus the player gets The Clown and its associated point value.

 

I am willing to use this thread as a personal development blog for the game due to the fact that I would like everyone here to try out the program and provide me with a few hints, tips and advice to help me get this game working perfectly. :) 

 

A few notes though:

 

  • The original card game is trademarked and copyrighted by Paul Peterson and Wizards of the Coast. This project is a personal hobby program designed to recreate the gameplay of the original tabletop card game. There is no personal intention of violating the rights of Peterson or Wizards of the Coast. In fact, this program is intended to help promote the actual card game itself and not be used as a substitute for it. Trust me, the real game with all its nice artwork and social play with other players is far, far better than this little command line game. ;) 
  • Due to the immense size of the code I have right now for the program, I'm only going to be putting up snippets of it in this thread for the purposes of pointing out bugs, updates or any other reasons I can think of. If there are those who wish to to see the entire program to help me fix bugs, please send me a PM. I would rather not see lurkers try to steal my code for the purposes of a cheap gain on their own end.
  • Updates will happen when they'll happen. Real life has a tendency to get in my way and I'm not just coding here. ;)

 

So there we go. I hope this program will bring some excitement to fans of not only this card game but to other tabletop games as well. 

 

By the way, here's the Wiki article for the game to help you all get a general idea of what it is.  ;)

 

--> http://en.wikipedia....illotine_(game)


Edited by Yuriy M, 30 March 2014 - 05:15 PM.

For $1000: Something that is a miserable pile of secrets.

#2 Yuriy M

Yuriy M

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 126 posts

Posted 09 April 2014 - 06:48 PM

Well, I scraped together some code and created a basic function of the program.

 

A few notes:

 

  • No action cards have been coded in yet. The only thing you can use 'A' for is to execute Master Spy's effect. This isn't practical but it's something I have put together until the action cards officially get programmed in. Pressing 'A' when Master Spy isn't in the Lineup will cause a program crash.
  • The Clown's effect seems to work and not work at times. I have no idea what the exact cause of this is.
  • Count and Countess's effects aren't working just yet but the code for them has been written up.
  • Palace Guard's effects aren't working just yet but the code for them has been written up.
  • Tragic Figure's effects aren't working just yet but the code for them has been written up.
  • Fast Noble's effect appears to be working after much wrangling.

If you have anything you guys want to add, feel free to post!  :)

 

 


Edited by Yuriy M, 09 April 2014 - 06:49 PM.

For $1000: Something that is a miserable pile of secrets.

#3 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 10 April 2014 - 01:03 PM

Hello Yury,

 

I will try to take a look at it when I find a reasonable time window, but let me be honest with you, for everyone will be difficult to test and give an opinion about a unknown game. and I see getting to know the rules can take a while... so no promises. Maybe you could entice the guys by telling a little about the game itself...



#4 Yuriy M

Yuriy M

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 126 posts

Posted 30 April 2014 - 07:07 PM

Sorry guys but by the way it looks like, I'll have to put the program on hiatus. The program has become far too riddled with bugs and too difficult to trace after weeks of modifications and attempted simplification of the code. Quite frankly, this is turning into stress that I don't need right now. I may return to the project at a later time but right now, no dice.


For $1000: Something that is a miserable pile of secrets.

#5 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts

Posted 01 May 2014 - 06:46 AM

Sometimes, you let a program grow to a certain size and you realize you just have to do a massive restructure/recode on it. That may because of design flaws, maintainability issues, etc. Sounds like you just learned why refactoring is so important :)


Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#6 Yuriy M

Yuriy M

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 126 posts

Posted 01 May 2014 - 07:23 PM

Perhaps it is better if I re-tooled the program in C#. C is arguably left for legacy coders anyway and C# may help fix the issues I have.


For $1000: Something that is a miserable pile of secrets.

#7 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 01 May 2014 - 08:45 PM

That sounds good. It's a game-opener idea, make it easier and more accessible for the community to help with.

 

I also guess it won't be complicated for you to translate the code either.






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download