An Algorithmic and Social Introduction to Computer Science (CSC-105 2000S)

Describe a game that we might be able to write using the JavaScript we've figured out to date.



I do not know how easy of a game this would be to create, but the concept seems pretty simple. The only problem is that it would require a large database. I cannot think of the actual name of the usually comes out in newspapers. You are given a several letters that are arranged in no particular order.....looking at those letters, the users job is to create as many words as possible using the list of letters. I suppose we could use conditional statements to determine if words are correct or not, but for each arrangement of letter would require a database of the possible words.


Memory Game

I think that some kind of memory game might be feasible. Perhaps a page with buttons that when you click them show alerts with a word (this could also be used for the flash card system for foreign languages that someone was talking about a while ago), when you click two (in succession) with the same word they disappear, and when all of them are gone you get some kind of a "you win" message. Perhaps this could even be timed, telling the user "you completed this game in 00:00."


Bash the Animals

i thought i should do the thought question, even though i won't be there. here's a random idea. you know those games at chuckee cheese's where little weasels (or whatever other small animals) pop out of those holes and you have to hit them before they go back down? plastic animals, not real ones. and it's all automated. anyways, maybe you could make a game where you had a grid of dots and the dots would randomly change colors and you had to click on them while they were a certain color before they changed back. the challenge would be that you had to get a certain number of them in a limited amount of time.

or, if that doesn't sound very exciting, what about pac man? wait, i don't think we have the techology to do that yet. but thinking about other games that seem pretty basic. what about that game that used to come standard with all computers. not solitaire, the other one. battlefield. or something. the one with mines where you had to click on the button and if it was a mine you died but if it wasn't you were safe. i think we know enough javascript to do that. if anyone knows what i'm talking about that is. i'll be interested to see what the class decides to do!



With the Javascript we have figured out so far, you could write a trivia game made from large buttons. Let's say you would construct a table of buttons options with certain point values inscribed on them. Then, the player would choose a button, and be asked to respond to a question. If the player responds correctly, the game would be programed to add points to a score keeping record; incorrect responses would have a separate effect on the score (either 0 or -X). At the beginning of the game, the computer could have log-launched dialog boxes asking for number of players and player names. When all the buttons were pushed, the game would be over, and the highest scoring player would be declared by the computer (in an alert box) as the winner. The unfortunate thing about this game, with the code we have learned so far, is that it would never be able to change questions randomly. I guess it could be as fun as a mad lib though.



The game of memory

The setup would be something as follows: Rows and columns of buttons equal in size, shape, and color Half the buttons have random numbers assigned to them between the values of 0-99 Each button has pair (a separate button with the same assigned number)

An added twist could be to prompt the user for a difficulty level on a scale of 1-5,

if 1 is returned, then the buttons could be arranged in a 4*4 pattern
if 2 is returned, then the buttons could be arranged in a 5*5 pattern
if 3 is returned, then the buttons could be arranged in a 6*6 pattern
if 4 is returned, then the buttons could be arranged in a 7*7 pattern
if 5 is returned, then the buttons could be arranged in a 8*8 pattern


User A would click on an unmarked button,
OnClick alert message is prompted with value of button, 
Local computer remembers value, 
User A clicks on another unmarked button, 
OnClick alert message is prompted with value of button,
Local computer remembers value,
Local computer compares values of numbers returned by alert messages,
If value of alert messages are equal, then return point for User A, buttons that were previously clicked on are
removed from the game, and User A begins turn again;
Else, buttons that were previously clicked on do not change and User B begins turn
A cycle develops with User B replacing User A in the operation



Well, hang-man was already given away in class today, so I'll try to come up with something else. The only thing i can think of is maybe a question and answer type of game, like Trivial Pursuit or Jeopardy. Trivial Pursuit might be too complicated for what we've done so far, but it seems possible using JavaScript. You would need a vast library of questions in different categories that are randomly choosen when a player selects a category. So you could use buttons and scrolldown menus possibly in this game, but it would be difficult to do the animation of a game pieces on the game board on the screen. Conditionals could also be used in determining if the players answer is correct or incorrect and what to do next, i.e. continue on to the next player.

Jeopardy might be easier, because you could just have a one-player game. You could use buttons, scrolldown menus, and conditionals, but I think it would be less complex overall. It seems to me that just getting the information (i.e. all of the questions) in the computer and making them accessible and random.

I would like to see you and Sarah make "Pac-Man" tomorrow, though. Just use the ballState algorithm and a little magic ... you can do it! :-)



Oh, a good game to play. I tend to think of this in terms of a Wheel of Fortune or Jeopardy! style game. It would probably be easier, but more time-consuming, to amass a Jeopardy! style game with several general knowledge trivia questions. A simple graphical interface is also possible, but might require even more time. The time-consuming part I envision is that of the questions; it probably would take awhile to write the proper question-to-answer conditionals required to do that. It would be simpler, though probably harder because of the graphics that would be necessary for a nicer version of the game. A few puzzles and instructions on how to randomize the puzzles and basic instructions on the rules of the game, but I think it's a little easy to do a simple version and I would rather see a version that actually had animations of the letters and such. I'm probably being a little picky, though. It might actually be better to do a "Who Wants to be a Millionaire?" kind of game, because values of difficulty could be set for each level of question and the corresponding question group, and you wouldn't have to deal with the dollar amount so much as with Jeopardy!. Those are my suggestions, but I suspect other, better ideas are possible.

Note: an online version of Jeopardy, with several different categories, is available at


Trivia Games

I wonder if we could make a sort of "Family Feud" or trivia game. Have the page prompt you at the beginning with a question (or category) and if you give the right answer (use a conditional) go on to the next, maybe do that a few times then if you "win" display a "winner" screen, and if you lose have a "loser" screen. That might be fun.



I think we could make a simple trivia game. There could be different categories, accessible from a pulldown menu. The questionc could be presented in dialogue or alert box form, as would the answers. I guess the catalog of questions wouldn't be that big, but it could be expanded. I suppose it would work something like a password identification program, combined with the Mad Lib type of response. Or there's always Hangman...

Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

This page may be found at

Source text last modified Wed Feb 16 08:16:02 2000.

This page generated on Wed Mar 15 09:18:55 2000 by Siteweaver. Validate this page's HTML.

Contact our webmaster at