Thread: Help with my first C game's IA

  1. #1
    Registered User
    Join Date
    Jan 2015
    Posts
    2

    Question Help with my first C game's IA

    Hey!

    I am new in C programming and I just made a game in C (on cmd printed screen) which consists on a board where a number of "stones" are placed. At the beginning, you select how many rows and how many stones will the board have. It needs 2 players.

    In shifts, players have to remove stones from a selected row (being possible to delete the amount of stones of that row that the player wants, but removing 1 minimum!!) and the one who removes the last stone of all rows, loses.

    Example:

    1 O O O
    2 O O O O O
    3 O O O O

    If third row is selected, you can remove from 1 stone to 4.

    My question is: Is it possible to make IA for this game in C programing? I tried with some 'if' but it's hard to guess every single possibility when the board size is eligible. (I don't want someone to make this for me, but to tell me if it's possible to do and give me some examples).

    By the way, in my country this game is known as "Shepherd's game"

    Thanks and sorry for my English

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,667
    I take it IA means "Artificial Intelligence"

    Minimax game tree programming, part 1 - Cprogramming.com
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2015
    Posts
    2
    I read some related threads and I'm a bit lost
    I'm learning new things first and then I will try to understand all that stuff

    Thank you anyway!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ SDL: Undefined reference to Game::Game()?
    By DecoratorFawn82 in forum C++ Programming
    Replies: 5
    Last Post: 09-24-2013, 12:31 PM
  2. Should I use a game engine in making a RPG game?
    By m3rk in forum Game Programming
    Replies: 6
    Last Post: 01-26-2009, 04:58 AM
  3. Guessing game: how to quit the game?
    By hzr in forum C Programming
    Replies: 5
    Last Post: 12-18-2008, 10:53 AM
  4. craps game & dice game..
    By cgurl05 in forum C Programming
    Replies: 3
    Last Post: 03-25-2006, 07:58 PM
  5. Game Designer vs Game Programmer
    By the dead tree in forum Game Programming
    Replies: 8
    Last Post: 04-28-2005, 09:17 PM

Tags for this Thread