1 Replies - 632 Views - Last Post: 27 November 2009 - 05:59 PM Rate Topic: -----

#1 rawfrijoles   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-November 09

Working with I/O with an executable

Post icon  Posted 27 November 2009 - 01:41 PM

Hi, I'm a high school student in APCS. I'm making a crossover project, that is, the game of Ghost (http://en.wikipedia.org/wiki/Ghost_(game)) in Latin. I plan on simply making the program work with basic I/O before making a GUI. That's not the hard part, however. Since it would be an arduous (and at my level, nigh impossible) task to code a program that returns information about all Latin words, I plan to use an already completed (and absolutely excellent) program called WORDS (http://ablemedia.com/ctcweb/showcase/whitakerwords.html) by a man named William Whitaker. First, here is what I want the program to do.

Recall that the game of Ghost is played by having each player add one letter at a time. The player who completes a word greater than two characters in length or adds a letter which makes the word not a fragment of any existent word loses and gains a point.

1. Program prompts user for number of AI players and number of human players
2. Starting player is randomly selected.
3. Each time a letter is added which brings the word String's length to greater than two, the String is passed to WORDS to check if it is a valid Latin word. If it is a complete word the player who finished the word loses. If it is not a part of any valid word, the player loses. If it is part of a valid word, the game continues.
4. As soon as the word is completed, the loser's point will be added and details about the word (e.g. a noun's case, gender, or meaning) will be printed out (I plan to make this as a sort of educational aid)
5. Players are eliminated at 5 points. Program can be exited at any time by entering "-1".

(Note: I know I will need to use a fusion of both WORDS and a Latin word list in order to make the game work, since WORDS does not recognize partial words. For example, pue, although part of the word puella, will return as unknown.)

The hardest part of this will be getting the I/O with WORDS to work. WORDS source code is available but the problem is that it is written in Ada, which I have never worked with. A friend of mine told me that it might be possible to communicate between programs (WORDS the executable is a command-prompt style program, where the user enters a word and the information is returned) using BASH, but I have no experience with that either. I'm not sure what to do here. Any help you can afford would be greatly appreciated, as I think this would be a great game once completed.

EDIT: This is a better link for WORDS. You can download the source code here. http://users.erols.c...taker/words.htm

This post has been edited by rawfrijoles: 27 November 2009 - 01:47 PM

Is This A Good Question/Topic? 0
  • +

Replies To: Working with I/O with an executable

#2 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8378
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: Working with I/O with an executable

Posted 27 November 2009 - 05:59 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1