Scrabble game: Player's input

Started by
0 comments, last by vex_helix 20 years, 1 month ago
Argh.. this is getting frustrated. I fix one problem, another one appears. I am now having trouble on how to take in the user''s input in a game of Scrabble. I am a beginner in C programming language. Consider the first player already went, and placed down his word:
R A I D
This word was entered by asking the user for a proper location and the FULL WORD that he wants to make. Now the next player''s turn. How should I get his input? If I get in terms of location and letters, I can make a new word like this
R A I D S
(just adding the letter S at location (0,4) for this case) or like this with location of (1,1)
R A I D
  S 
But what if the user wants a word like this:

  D
R A I D
  D
then you are not just adding letters to preexisiting words but also adding letter(s) before and after. I looked into entering the whole word and the location but that won''t work, if you want to make multiple words using your letters. I hope you guys understand what I am trying to say. Plz ask for any clarification as required. regards, Helix
Advertisement
Well, you could start by reformatting your post so that it is readable...
"What are you trying to tell me? That I can write an O(N^2) recursive solution for a 2-dimensional knapsack?" "No, programmer. I'm trying to tell you that when you're ready, you won't have to." -Adapted from "The Matrix"

This topic is closed to new replies.

Advertisement