Topic: Mastermind Pages that link to <a href="https://ozoneasylum.com/backlink?for=9536" title="Pages that link to Topic: Mastermind" rel="nofollow" >Topic: Mastermind\

 
Author Thread
St. Seneca
Paranoid (IV) Inmate

From: 3rd shelf, behind the cereal
Insane since: Dec 2000

IP logged posted posted 10-03-2002 23:46 Edit Quote

Please give this a lookat. I would like any suggestions that you might have.

<html>
<head>
<title>MASTERMIND</title>
<script language="JavaScript">
<!--

function playGame()
{

var solutionArray = new Array();
var guessArray = new Array();
var guessMatch = new Array();
var solutionMatch = new Array();
var checkWin = new Array();
var check = win = 0;

generateNumber(solutionArray);

document.write("<STYLE> BODY, TD {font-family: courier; background: #000; color: #fff; font-size: 8pt;}\r");
document.write("#main {font-size: 10pt;} </STYLE>");

document.write("<TABLE WIDTH='400' CELLPADDING='2' CELLSPACING='1' BORDER='0'>");
document.write("<TR VALIGN='top'><TD COLSPAN='4' ALIGN='center' ID='main'>");
document.write("<FONT COLOR='#ff0000'>M</FONT><FONT COLOR='#00ff00'>A</FONT>");
document.write("<FONT COLOR='#ffff00'>S</FONT><FONT COLOR='#ff00ff'>T</FONT>");
document.write("<FONT COLOR='#0000ff'>E</FONT><FONT COLOR='#00ffff'>R</FONT>");
document.write("<FONT COLOR='#ffffff'>M</FONT><FONT COLOR='#ff0000'>I</FONT>");
document.write("<FONT COLOR='#ffff00'>N</FONT><FONT COLOR='#00ff00'>D</FONT>");
document.write("</TD></TR></TABLE>\r");

document.write("<TABLE WIDTH='400' CELLPADDING='2' CELLSPACING='1' BORDER='0'>");
document.write("<TR VALIGN='top'><TD WIDTH='100'>Your Guess</TD>");
document.write("<TD WIDTH='100'>

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

IP logged posted posted 10-03-2002 23:53 Edit Quote

Let the user hit the "cancel" button to quit the game, perhaps with the option of starting again from where they left off. In any case, if they hit cancel, don't pop up the box again - otherwise there's no way to leave the page except to win the game.

Also, you could make it look nicer and cleaner with CSS.

In the future, please upload and give us a link. Copying HTML code is a nuisance, especially when UBB changes all double bars (

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

IP logged posted posted 10-06-2002 10:48 Edit Quote

Not sure if you can influence 'where' the JS prompt box appears, but on my screen its bang on top of your title and columns - so I keep moving to read how I did last time..

Perhaps its possible to take input another way?

Very cool though - if it wasn't sunday morning I'd try to complete a game!

Pete

St. Seneca
Paranoid (IV) Inmate

From: 3rd shelf, behind the cereal
Insane since: Dec 2000

IP logged posted posted 10-10-2002 17:27 Edit Quote

It would be great if there were another way to accept input. Does anyone have any ideas. I think it would address a lot of issues.

Slime, the letter 'q' lets you quit at any time, but cancel would be better. How would one do that? What would a better taxonomy be for 'matches' and 'correct'? I agree that they are slightly ambiguous, but I have been unable to come up with anything better.

I was unaware of the html issues. Thank you.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu