APCG 180 Lecture Notes - Lecture 9: Computer-Aided Design

98 views5 pages

Document Summary

In the if (event. which = 32) fillrectangle (10,50,100,30) is filling the white space around the dartboard to make it visible. Gr. drawtext ((cid:3247)score(cid:3248) + score, new jspoint(10,50). (cid:3243)black(cid:3244)); how to drawtext this. Set it to gr. drawtext ( score + score, new jspoint(10,50). The score is block when you threw darts at the dartboard. When doing an if statement, put an else statement afterwards too: If (event. which == 32) fillrectangle (10,50,200,30,"white"); gr. drawtext ( player 1 score + score2, new jspoint(10,90), black"); else player2_color); do not enter here. It(cid:3244)s not entered. jspoint(10,90),"black"); fillrectangle (10,90,200,30,"white"); gr. drawtext ( player 2 score + score2, new if (event. which == 13) If (event. which == 32) && (playerturn%2 == 0)) Go to variation (var) and add in var playerturn = o; . Add in playerturn ++; at the end of player1 and player2 section: If (event. which == 32) fillrectangle (10,50,200,30,"white"); gr. drawtext ( player 1 score + score2, new jspoint(10,90), black"); playerturn ++; here.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents