Jump to content
  • Announcements

    • boen_robot

      Guidelines and Netiquette   03/28/2017

      Posting Problems:   Having problems posting your topic? Read through this: To join, you agree to our terms and conditions and fill out and submit a registration form. An activation email will be sent to your email adress, so you'll need to verify your account. After that the account has to be validated by one of the moderators. This will mean that it can take up to a day to be activated. A couple of things to remember to ensure approval: Don't use an email address in one of those $2 four character .com domains eg. xyds.com. These will be deleted and the domain added to the banned list. Don't use an email address that is within a domain with a bad reputation for spam. A Google search is run on every email address and email domain. Don't sign up with an email address that doesn't exist, doesn't work or requires the sender to answer a quiz before their email can get to you. Put your country and or state and city in the signup form. Blank forms will go to the botton of the "to do" list. And make sure that your email address and your country match, saying you're from Alabama and using a .ru email address is not going to get you activated. After a membership is activated the first few posts will be monitored. Posting spam or unapproved topics described in the agreement results in an immediate ban. The email provider and the IP addresses associated with the account will be banned and all posts will be deleted. These strict measures have been deemed necessary to hinder spam. Sorry for any inconvenience this causes, but it's not liable to change. If, after reading this, you still can't post and don't understand why, contact one of the Moderators listed here.   Topic Guidelines   Including the following information can expedite an accurate response from board members: Must be a Specific Problem or Question related to web design and development Include Code in Question (wrap with   for small blocks of code and for longer blocks   ) Include Code Author Include Extra Notes/Modifications/Attempts Include web link to page/file when possible Content Guidelines   You may not post, upload, link to, or email any Content that contains, promotes, gives instruction about, or provides prohibited Content. Prohibited Content includes any Content that breaks any local, state, county, national or international law. Prohibited Content also includes: No direct or indirect advertising or websites, forums, products, services No hijacking of posts (do not post your question in someone elses) Content that infringes upon any rights [ex. MP3s and ROMs] (including, but not limited to, copyrights and trademarks) Abusive, threatening, defamatory, racist, or obscene Viruses or any other harmful computer software False Information or libel Spam, chain letters, or Pyramid schemes Gambling or Illicit drugs Terrorism Hacking or cheating for internet/online games Warez, Roms, CD-Keys, Cracks, Passwords, or Serial Numbers Pornography, nudity, or sexual material of any kind Excessive profanity Invasive of privacy or impersonation of any person/entity Hacking materials or information Posting Tips   There are more BBcodes than there are buttons for on the reply menu. To get the full list, click "BB Code Help" underneath the clickable smilie face menu. Use   for small snippets of code Use   for lengthy snippets of code Use   if your snippet is HTML (optional) Use   if your snippet is SQL (optional) Rules of Conduct   Be nice. There's no need for calling someone stupid if they ask an 'easy' question. Keep your avatars and signatures absolutely child friendly. We have a younger audience on this forum. Keep your language appropriate for the same reason above. Do not PM moderators for help on the forum. Post on the topic, or create a new one.   Spam:   Recently, as you have all without doubt noticed, we have had lots of spam and advertisement on the forum. Therefore, we'd like to alert you as to what to do when you have found any of the aforementioned annoying messages: it. Immediately. Give a clear reason, please, if the advertising is not evident. DO NOT POST! Report, let the post stay as is, and we will get to it, meanwhile if you continue to post as normal in the other threads, it won't be on the top so long. Refrain from PMing the member. This won't help at all, as they are most likely spambots anyway. Thank you.       Images in signatures:   After thinking of users on dial-up, we have decided to enforce the following rules regarding signatures. Please pay heed to them. Respecting these rules is respecting the members on this forum with dial-up. Signature rules: No animated images AT ALL. No matter the amount of animation. Maximum image widthxheight: 300x150 Maximum image (file) size: 15kb Use calm colors. Do not use highly contrasting images in your signature, as this can get really annoying when seeing several posts from one member in the same thread. The same prohibited content goes for images as for posts. Lastly, use common sense. No lengthy signatures please. Save us some scrolling. Thank you.       Links in signatures:   Please understand that w3schools.com only exists because of voluntary work and is barely supported by the advertising littered throughout the tutorials and the forum. So, please, stop advertising other sites. DO not post links that drive traffic away from the w3schools domain - especially to a site that offers similar if not identical information. Please help support the site by keeping individuals on it. Thank you. Here are some guidelines as to what you can put in your signature: w3schools links --> allowed w3.org links --> allowed browser links --> allowed html editor links --> allowed personal sites --> allowed tutorial sites competing with w3schools --> NOT allowed sites completely irrelevant to webprogramming and this forum --> NOT allowed   Thanks for understanding, and for taking the time to read this. ~W3Schools Modstaff~
Sign in to follow this  
NielsvGorsel

Can someone please check this code?

Recommended Posts

Hello guys, i have been making the game called 'MasterMind'. I am allmost finished with the project but i do have one weird error left.I made the code in the program named 'NetBeans'. The problem is: If I fill in the 6th circle on the 10x4 screen where you can guess the solution. I cannot fill in the circels further, but if i keep choosing the same color i do can full in all colors. The problem is quite hard to explain. So here is the Javascript code, please use the code to help me solve my error. Thanks! :) - The code is quite long, but i do need a lot of codes to discribe the mastermind game for myself. I know it could be done shorter but I do not require the skills to make that happen! ;) ~ Many Thanks Niels ----------------- The Java Code -------------------- /** Main.fx** Created on 18-apr-2012, 10:23:10*/ package mastermind; import javafx.scene.Scene;import javafx.stage.Stage;import javafx.scene.shape.Rectangle;import javafx.scene.paint.Color;import javafx.scene.control.Button;import javafx.scene.shape.Circle;import java.lang.Math;import javafx.scene.input.MouseEvent;import javafx.scene.Group;import javafx.scene.text.Text;import javafx.scene.text.Font;import javafx.scene.text.*;import javafx.scene.paint.*;import javafx.scene.shape.Line; /*** @author Nielz*/var stage:Stage;var scene:Scene;var checkbutton:Button;var nieuwbutton:Button;var afsluitbutton:Button;var wintext:Text;var randomnummer1 = Math.random();var randomnummer2 = Math.random();var randomnummer3 = Math.random();var randomnummer4 = Math.random();var kleur1 = Color.RED;var kleur2 = Color.MAGENTA;var kleur3 = Color.BLUE;var kleur4 = Color.GREEN;var yellowcircle:Circle; var magentacircle:Circle; var redcircle:Circle; var bluecircle:Circle; var greencircle:Circle; var orangecircle:Circle; var rij1:Group; var rij2:Group; var rij3:Group; var rij4:Group;var rij5:Group;var rij6:Group; var rij7:Group; var rij8:Group; var rij9:Group; var rij10:Group; var c1r1:Circle; var c2r1:Circle; var c3r1:Circle; var c4r1:Circle; var c1r2:Circle; var c2r2:Circle; var c3r2:Circle; var c4r2:Circle; var c1r3:Circle; var c2r3:Circle; var c3r3:Circle; var c4r3:Circle; var c1r4:Circle; var c2r4:Circle; var c3r4:Circle; var c4r4:Circle; var c1r5:Circle; var c2r5:Circle; var c3r5:Circle; var c4r5:Circle; var c1r6:Circle; var c2r6:Circle; var c3r6:Circle; var c4r6:Circle; var c1r7:Circle; var c2r7:Circle; var c3r7:Circle; var c4r7:Circle; var c1r8:Circle; var c2r8:Circle; var c3r8:Circle; var c4r8:Circle; var c1r9:Circle; var c2r9:Circle; var c3r9:Circle; var c4r9:Circle; var c1r10:Circle; var c2r10:Circle; var c3r10:Circle; var c4r10:Circle; //de kleine cirkels var k1r1:Circle; var k2r1:Circle; var k3r1:Circle; var k4r1:Circle; var k1r2:Circle; var k2r2:Circle; var k3r2:Circle; var k4r2:Circle; var k1r3:Circle; var k2r3:Circle; var k3r3:Circle; var k4r3:Circle; var k1r4:Circle; var k2r4:Circle; var k3r4:Circle; var k4r4:Circle; var k1r5:Circle; var k2r5:Circle; var k3r5:Circle; var k4r5:Circle; var k1r6:Circle; var k2r6:Circle; var k3r6:Circle; var k4r6:Circle; var k1r7:Circle; var k2r7:Circle; var k3r7:Circle; var k4r7:Circle; var k1r8:Circle; var k2r8:Circle; var k3r8:Circle; var k4r8:Circle; var k1r9:Circle; var k2r9:Circle; var k3r9:Circle; var k4r9:Circle; var k1r10:Circle;var k2r10:Circle;var k3r10:Circle; var k4r10:Circle; //de eigenlijke variabelen die de kleur van de cirkels boolean maakt omdat je not niet samen met Color.WHITE kan gebruiken var c1r1wit:Boolean; var c2r1wit:Boolean; var c3r1wit:Boolean; var c4r1wit:Boolean; var k1r1wit:Boolean; var k2r1wit:Boolean; var k3r1wit:Boolean; var k4r1wit:Boolean; var c1r2wit:Boolean; var c2r2wit:Boolean; var c3r2wit:Boolean; var c4r2wit:Boolean; var k1r2wit:Boolean; var k2r2wit:Boolean; var k3r2wit:Boolean; var k4r2wit:Boolean; var c1r3wit:Boolean; var c2r3wit:Boolean; var c3r3wit:Boolean; var c4r3wit:Boolean; var k1r3wit:Boolean; var k2r3wit:Boolean; var k3r3wit:Boolean; var k4r3wit:Boolean; var c1r4wit:Boolean; var c2r4wit:Boolean; var c3r4wit:Boolean; var c4r4wit:Boolean; var k1r4wit:Boolean; var k2r4wit:Boolean; var k3r4wit:Boolean; var k4r4wit:Boolean; var c1r5wit:Boolean; var c2r5wit:Boolean; var c3r5wit:Boolean; var c4r5wit:Boolean; var k1r5wit:Boolean; var k2r5wit:Boolean; var k3r5wit:Boolean; var k4r5wit:Boolean; var c1r6wit:Boolean; var c2r6wit:Boolean; var c3r6wit:Boolean; var c4r6wit:Boolean; var k1r6wit:Boolean; var k2r6wit:Boolean; var k3r6wit:Boolean; var k4r6wit:Boolean; var c1r7wit:Boolean; var c2r7wit:Boolean; var c3r7wit:Boolean; var c4r7wit:Boolean; var k1r7wit:Boolean; var k2r7wit:Boolean; var k3r7wit:Boolean; var k4r7wit:Boolean; var c1r8wit:Boolean; var c2r8wit:Boolean; var c3r8wit:Boolean; var c4r8wit:Boolean; var k1r8wit:Boolean; var k2r8wit:Boolean; var k3r8wit:Boolean; var k4r8wit:Boolean; var c1r9wit:Boolean; var c2r9wit:Boolean; var c3r9wit:Boolean; var c4r9wit:Boolean; var k1r9wit:Boolean; var k2r9wit:Boolean; var k3r9wit:Boolean; var k4r9wit:Boolean; var c1r10wit:Boolean;var c2r10wit:Boolean;var c3r10wit:Boolean;var c4r10wit:Boolean; var k1r10wit:Boolean;var k2r10wit:Boolean;var k3r10wit:Boolean;var k4r10wit:Boolean; //de code die de kleur van de invulcirkels (c1r1-c4r10)en de controle cirkels (k1r1-k4r10) boolean maaktif(c1r1.fill == Color.WHITE){c1r1wit = true}if(c2r1.fill == Color.WHITE){c2r1wit = true}if(c3r1.fill == Color.WHITE){c3r1wit = true}if(c4r1.fill == Color.WHITE){c4r1wit = true} if(c1r2.fill == Color.WHITE){c1r2wit = true}if(c2r2.fill == Color.WHITE){c2r2wit = true}if(c3r2.fill == Color.WHITE){c3r2wit = true}if(c4r2.fill == Color.WHITE){c4r2wit = true} if(c1r3.fill == Color.WHITE){c1r3wit = true}if(c2r3.fill == Color.WHITE){c2r3wit = true}if(c3r3.fill == Color.WHITE){c3r3wit = true}if(c4r3.fill == Color.WHITE){c4r3wit = true} if(c1r4.fill == Color.WHITE){c1r4wit = true}if(c2r4.fill == Color.WHITE){c2r4wit = true}if(c3r4.fill == Color.WHITE){c3r4wit = true}if(c4r4.fill == Color.WHITE){c4r4wit = true} if(c1r5.fill == Color.WHITE){c1r5wit = true}if(c2r5.fill == Color.WHITE){c2r5wit = true}if(c3r5.fill == Color.WHITE){c3r5wit = true}if(c4r5.fill == Color.WHITE){c4r5wit = true} if(c1r6.fill == Color.WHITE){c1r6wit = true}if(c2r6.fill == Color.WHITE){c2r6wit = true}if(c3r6.fill == Color.WHITE){c3r6wit = true}if(c4r6.fill == Color.WHITE){c4r6wit = true} if(c1r7.fill == Color.WHITE){c1r7wit = true}if(c2r7.fill == Color.WHITE){c2r7wit = true}if(c3r7.fill == Color.WHITE){c3r7wit = true}if(c4r7.fill == Color.WHITE){c4r7wit = true} if(c1r8.fill == Color.WHITE){c1r8wit = true}if(c2r8.fill == Color.WHITE){c2r8wit = true}if(c3r8.fill == Color.WHITE){c3r8wit = true}if(c4r8.fill == Color.WHITE){c4r8wit = true} if(c1r9.fill == Color.WHITE){c1r9wit = true}if(c2r9.fill == Color.WHITE){c2r9wit = true}if(c3r9.fill == Color.WHITE){c3r9wit = true}if(c4r9.fill == Color.WHITE){c4r9wit = true} if(c1r10.fill == Color.WHITE){c1r10wit = true}if(c2r10.fill == Color.WHITE){c2r10wit = true}if(c3r10.fill == Color.WHITE){c3r10wit = true}if(c4r10.fill == Color.WHITE){c4r10wit = true}//hier begint het gedeelte voor de kleine cirkelsif(k1r1.fill == Color.WHITE){k1r1wit = true}if(k2r1.fill == Color.WHITE){k2r1wit = true}if(k3r1.fill == Color.WHITE){k3r1wit = true}if(k4r1.fill == Color.WHITE){k4r1wit = true} if(k1r2.fill == Color.WHITE){k1r2wit = true}if(k2r2.fill == Color.WHITE){k2r2wit = true}if(k3r2.fill == Color.WHITE){k3r2wit = true}if(k4r2.fill == Color.WHITE){k4r2wit = true} if(k1r3.fill == Color.WHITE){k1r3wit = true}if(k2r3.fill == Color.WHITE){k2r3wit = true}if(k3r3.fill == Color.WHITE){k3r3wit = true}if(k4r3.fill == Color.WHITE){k4r3wit = true} if(k1r4.fill == Color.WHITE){k1r4wit = true}if(k2r4.fill == Color.WHITE){k2r4wit = true}if(k3r4.fill == Color.WHITE){k3r4wit = true}if(k4r4.fill == Color.WHITE){k4r4wit = true} if(k1r5.fill == Color.WHITE){k1r5wit = true}if(k2r5.fill == Color.WHITE){k2r5wit = true}if(k3r5.fill == Color.WHITE){k3r5wit = true}if(k4r5.fill == Color.WHITE){k4r5wit = true} if(k1r6.fill == Color.WHITE){k1r6wit = true}if(k2r6.fill == Color.WHITE){k2r6wit = true}if(k3r6.fill == Color.WHITE){k3r6wit = true}if(k4r6.fill == Color.WHITE){k4r6wit = true} if(k1r7.fill == Color.WHITE){k1r7wit = true}if(k2r7.fill == Color.WHITE){k2r7wit = true}if(k3r7.fill == Color.WHITE){k3r7wit = true}if(k4r7.fill == Color.WHITE){k4r7wit = true} if(k1r8.fill == Color.WHITE){k1r8wit = true}if(k2r8.fill == Color.WHITE){k2r8wit = true}if(k3r8.fill == Color.WHITE){k3r8wit = true}if(k4r8.fill == Color.WHITE){k4r8wit = true} if(k1r9.fill == Color.WHITE){k1r9wit = true}if(k2r9.fill == Color.WHITE){k2r9wit = true}if(k3r9.fill == Color.WHITE){k3r9wit = true}if(k4r9.fill == Color.WHITE){k4r9wit = true} if(k1r10.fill == Color.WHITE){k1r10wit = true}if(k2r10.fill == Color.WHITE){k2r10wit = true}if(k3r10.fill == Color.WHITE){k3r10wit = true}if(k4r10.fill == Color.WHITE){k4r10wit = true}//de randomkleuringen van kleur 1/*if((randomnummer1*6)>0 and (randomnummer1*6)<=1){ kleur1 =Color.MAGENTA }if((randomnummer1*6)>1 and (randomnummer1*6)<=2){ kleur1 = Color.RED }if((randomnummer1*6)>2 and (randomnummer1*6)<=3){ kleur1 =Color.BLUE }if((randomnummer1*6)>3 and (randomnummer1*6)<=4){ kleur1 = Color.GREEN }if((randomnummer1*6)>4 and (randomnummer1*6)<=5){ kleur1 =Color.ORANGE }if((randomnummer1*6)>5 and (randomnummer1*6)<=6){ kleur1 = Color.YELLOW } //de randomkleurgen voor kleur2if((randomnummer2*6)>0 and (randomnummer2*6)<=1){ kleur2 =Color.MAGENTA }if((randomnummer2*6)>1 and (randomnummer2*6)<=2){ kleur2 = Color.RED }if((randomnummer2*6)>2 and (randomnummer2*6)<=3){ kleur2 =Color.BLUE }if((randomnummer2*6)>3 and (randomnummer2*6)<=4){ kleur2 = Color.GREEN }if((randomnummer2*6)>4 and (randomnummer2*6)<=5){ kleur2 =Color.ORANGE }if((randomnummer2*6)>5 and (randomnummer2*6)<=6){ kleur2 = Color.YELLOW }//de randomkleurgen voor kleur3if((randomnummer3*6)>0 and (randomnummer3*6)<=1){ kleur3 =Color.MAGENTA }if((randomnummer3*6)>1 and (randomnummer3*6)<=2){ kleur3 = Color.RED }if((randomnummer3*6)>2 and (randomnummer3*6)<=3){ kleur3 =Color.BLUE }if((randomnummer3*6)>3 and (randomnummer3*6)<=4){ kleur3 = Color.GREEN }if((randomnummer3*6)>4 and (randomnummer3*6)<=5){ kleur3 =Color.ORANGE }if((randomnummer3*6)>5 and (randomnummer3*6)<=6){ kleur3 = Color.YELLOW } //de randomkleurgen voor kleur4if((randomnummer4*6)>0 and (randomnummer4*6)<=1){ kleur4 =Color.MAGENTA }if((randomnummer4*6)>1 and (randomnummer4*6)<=2){ kleur4 = Color.RED }if((randomnummer4*6)>2 and (randomnummer4*6)<=3){ kleur4 =Color.BLUE }if((randomnummer4*6)>3 and (randomnummer4*6)<=4){ kleur4 = Color.GREEN }if((randomnummer4*6)>4 and (randomnummer4*6)<=5){ kleur4 =Color.ORANGE }if((randomnummer4*6)>5 and (randomnummer4*6)<=6){ kleur4 = Color.YELLOW }*/var regel1zwart:Number;var regel2zwart:Number;var regel3zwart:Number;var regel4zwart:Number;var regel5zwart:Number;var regel6zwart:Number;var regel7zwart:Number;var regel8zwart:Number;var regel9zwart:Number;var regel10zwart:Number;var regel1grijs:Number;var regel2grijs:Number;var regel3grijs:Number;var regel4grijs:Number;var regel5grijs:Number;var regel6grijs:Number;var regel7grijs:Number;var regel8grijs:Number;var regel9grijs:Number;var regel10grijs:Number;regel1zwart=0;regel2zwart=0;regel3zwart=0;regel4zwart=0;regel5zwart=0;regel6zwart=0;regel7zwart=0;regel8zwart=0;regel9zwart=0;regel10zwart=0;regel1grijs=0;regel2grijs=0;regel3grijs=0;regel4grijs=0;regel5grijs=0;regel6grijs=0;regel7grijs=0;regel8grijs=0;regel9grijs=0;regel10grijs=0; stage = Stage {title : "MASTERMIND" scene: scene = Scene {width: 750height: 750 fill: Color.TANcontent: [ //het speelveld Rectangle { x: 50 y: 50 width: 300 height: 540 arcWidth: 25 arcHeight: 25 stroke: Color.BLACK fill: LinearGradient { startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0, proportional: true stops: [ Stop {offset: 0.0 color: Color.BROWN}, Stop {offset: 1.0 color: Color.CHOCOLATE} ] } } //de knop om te controleren checkbutton = Button { translateX: 100 translateY: 650 width:150 text: "controleer code" action: function() { //functie om de code te checken regel1zwart=0;regel2zwart=0;regel3zwart=0;regel4zwart=0;regel5zwart=0;regel6zwart=0;regel7zwart=0;regel8zwart=0;regel9zwart=0;regel10zwart=0; regel1grijs=0;regel2grijs=0;regel3grijs=0;regel4grijs=0;regel5grijs=0;regel6grijs=0;regel7grijs=0;regel8grijs=0;regel9grijs=0;regel10grijs=0; if(c1r1.fill == Color.WHITE){c1r1wit = true} if(c2r1.fill == Color.WHITE){c2r1wit = true} if(c3r1.fill == Color.WHITE){c3r1wit = true} if(c4r1.fill == Color.WHITE){c4r1wit = true} if(c1r2.fill == Color.WHITE){c1r2wit = true} if(c2r2.fill == Color.WHITE){c2r2wit = true} if(c3r2.fill == Color.WHITE){c3r2wit = true} if(c4r2.fill == Color.WHITE){c4r2wit = true} if(c1r3.fill == Color.WHITE){c1r3wit = true} if(c2r3.fill == Color.WHITE){c2r3wit = true} if(c3r3.fill == Color.WHITE){c3r3wit = true} if(c4r3.fill == Color.WHITE){c4r3wit = true} if(c1r4.fill == Color.WHITE){c1r4wit = true} if(c2r4.fill == Color.WHITE){c2r4wit = true} if(c3r4.fill == Color.WHITE){c3r4wit = true} if(c4r4.fill == Color.WHITE){c4r4wit = true} if(c1r5.fill == Color.WHITE){c1r5wit = true} if(c2r5.fill == Color.WHITE){c2r5wit = true} if(c3r5.fill == Color.WHITE){c3r5wit = true} if(c4r5.fill == Color.WHITE){c4r5wit = true} if(c1r6.fill == Color.WHITE){c1r6wit = true} if(c2r6.fill == Color.WHITE){c2r6wit = true} if(c3r6.fill == Color.WHITE){c3r6wit = true} if(c4r6.fill == Color.WHITE){c4r6wit = true} if(c1r7.fill == Color.WHITE){c1r7wit = true} if(c2r7.fill == Color.WHITE){c2r7wit = true} if(c3r7.fill == Color.WHITE){c3r7wit = true} if(c4r7.fill == Color.WHITE){c4r7wit = true} if(c1r8.fill == Color.WHITE){c1r8wit = true} if(c2r8.fill == Color.WHITE){c2r8wit = true} if(c3r8.fill == Color.WHITE){c3r8wit = true} if(c4r8.fill == Color.WHITE){c4r8wit = true} if(c1r9.fill == Color.WHITE){c1r9wit = true} if(c2r9.fill == Color.WHITE){c2r9wit = true} if(c3r9.fill == Color.WHITE){c3r9wit = true} if(c4r9.fill == Color.WHITE){c4r9wit = true} if(c1r10.fill == Color.WHITE){c1r10wit = true} if(c2r10.fill == Color.WHITE){c2r10wit = true} if(c3r10.fill == Color.WHITE){c3r10wit = true} if(c4r10.fill == Color.WHITE){c4r10wit = true} //hier begint het gedeelte voor de kleine cirkels if(k1r1.fill == Color.WHITE){k1r1wit = true} if(k2r1.fill == Color.WHITE){k2r1wit = true} if(k3r1.fill == Color.WHITE){k3r1wit = true} if(k4r1.fill == Color.WHITE){k4r1wit = true} if(k1r2.fill == Color.WHITE){k1r2wit = true} if(k2r2.fill == Color.WHITE){k2r2wit = true} if(k3r2.fill == Color.WHITE){k3r2wit = true} if(k4r2.fill == Color.WHITE){k4r2wit = true} if(k1r3.fill == Color.WHITE){k1r3wit = true} if(k2r3.fill == Color.WHITE){k2r3wit = true} if(k3r3.fill == Color.WHITE){k3r3wit = true} if(k4r3.fill == Color.WHITE){k4r3wit = true} if(k1r4.fill == Color.WHITE){k1r4wit = true} if(k2r4.fill == Color.WHITE){k2r4wit = true} if(k3r4.fill == Color.WHITE){k3r4wit = true} if(k4r4.fill == Color.WHITE){k4r4wit = true} if(k1r5.fill == Color.WHITE){k1r5wit = true} if(k2r5.fill == Color.WHITE){k2r5wit = true} if(k3r5.fill == Color.WHITE){k3r5wit = true} if(k4r5.fill == Color.WHITE){k4r5wit = true} if(k1r6.fill == Color.WHITE){k1r6wit = true} if(k2r6.fill == Color.WHITE){k2r6wit = true} if(k3r6.fill == Color.WHITE){k3r6wit = true} if(k4r6.fill == Color.WHITE){k4r6wit = true} if(k1r7.fill == Color.WHITE){k1r7wit = true} if(k2r7.fill == Color.WHITE){k2r7wit = true} if(k3r7.fill == Color.WHITE){k3r7wit = true} if(k4r7.fill == Color.WHITE){k4r7wit = true} if(k1r8.fill == Color.WHITE){k1r8wit = true} if(k2r8.fill == Color.WHITE){k2r8wit = true} if(k3r8.fill == Color.WHITE){k3r8wit = true} if(k4r8.fill == Color.WHITE){k4r8wit = true} if(k1r9.fill == Color.WHITE){k1r9wit = true} if(k2r9.fill == Color.WHITE){k2r9wit = true} if(k3r9.fill == Color.WHITE){k3r9wit = true} if(k4r9.fill == Color.WHITE){k4r9wit = true} if(k1r10.fill == Color.WHITE){k1r10wit = true} if(k2r10.fill == Color.WHITE){k2r10wit = true} if(k3r10.fill == Color.WHITE){k3r10wit = true} if(k4r10.fill == Color.WHITE){k4r10wit = true} //de code die de wintext zichtbaar maakt if (c1r1.fill== kleur1 and c2r1.fill== kleur2 and c3r1.fill== kleur3 and c4r1.fill==kleur4){ wintext.visible = true } else if(c1r2.fill== kleur1 and c2r2.fill== kleur2 and c3r2.fill== kleur3 and c4r2.fill==kleur4){ wintext.visible = true } else if(c1r3.fill== kleur1 and c2r3.fill== kleur2 and c3r3.fill== kleur3 and c4r3.fill==kleur4){ wintext.visible = true } else if(c1r4.fill== kleur1 and c2r4.fill== kleur2 and c3r4.fill== kleur3 and c4r4.fill==kleur4){ wintext.visible = true } else if(c1r5.fill== kleur1 and c2r5.fill== kleur2 and c3r5.fill== kleur3 and c4r5.fill==kleur4){ wintext.visible = true } else if(c1r6.fill== kleur1 and c2r6.fill== kleur2 and c3r6.fill== kleur3 and c4r6.fill==kleur4){ wintext.visible = true } else if(c1r7.fill== kleur1 and c2r7.fill== kleur2 and c3r7.fill== kleur3 and c4r7.fill==kleur4){ wintext.visible = true } else if(c1r8.fill== kleur1 and c2r8.fill== kleur2 and c3r8.fill== kleur3 and c4r8.fill==kleur4){ wintext.visible = true } else if(c1r9.fill== kleur1 and c2r9.fill== kleur2 and c3r9.fill== kleur3 and c4r9.fill==kleur4){ wintext.visible = true } else if(c1r10.fill== kleur1 and c2r10.fill== kleur2 and c3r10.fill== kleur3 and c4r10.fill==kleur4){ wintext.visible = true } //de code om een hoeveelheid bolletjes zwart te maken if(c1r1.fill == kleur1){regel1zwart++} if(c2r1.fill == kleur2){regel1zwart++} if(c3r1.fill == kleur3){regel1zwart++} if(c4r1.fill == kleur4){regel1zwart++} if(c1r2.fill == kleur1){regel2zwart++} if(c2r2.fill == kleur2){regel2zwart++} if(c3r2.fill == kleur3){regel2zwart++} if(c4r2.fill == kleur4){regel2zwart++} if(c1r3.fill == kleur1){regel3zwart++} if(c2r3.fill == kleur2){regel3zwart++} if(c3r3.fill == kleur3){regel3zwart++} if(c4r3.fill == kleur4){regel3zwart++} if(c1r4.fill == kleur1){regel4zwart++} if(c2r4.fill == kleur2){regel4zwart++} if(c3r4.fill == kleur3){regel4zwart++} if(c4r4.fill == kleur4){regel4zwart++} if(c1r5.fill == kleur1){regel5zwart++} if(c2r5.fill == kleur2){regel5zwart++} if(c3r5.fill == kleur3){regel5zwart++} if(c4r5.fill == kleur4){regel5zwart++} if(c1r6.fill == kleur1){regel6zwart++} if(c2r6.fill == kleur2){regel6zwart++} if(c3r6.fill == kleur3){regel6zwart++} if(c4r6.fill == kleur4){regel6zwart++} if(c1r7.fill == kleur1){regel7zwart++} if(c2r7.fill == kleur2){regel7zwart++} if(c3r7.fill == kleur3){regel7zwart++} if(c4r7.fill == kleur4){regel7zwart++} if(c1r8.fill == kleur1){regel8zwart++} if(c2r8.fill == kleur2){regel8zwart++} if(c3r8.fill == kleur3){regel8zwart++} if(c4r8.fill == kleur4){regel8zwart++} if(c1r9.fill == kleur1){regel9zwart++} if(c2r9.fill == kleur2){regel9zwart++} if(c3r9.fill == kleur3){regel9zwart++} if(c4r9.fill == kleur4){regel9zwart++} if(c1r10.fill == kleur1){regel10zwart++}if(c2r10.fill == kleur2){regel10zwart++}if(c3r10.fill == kleur3){regel10zwart++}if(c4r10.fill == kleur4){regel10zwart++} //de code om een hoeveelheid bolletjes grijs te maken if(c1r1.fill == kleur2 or c1r1.fill == kleur3 or c1r1.fill == kleur4) {regel1grijs++} if(c2r1.fill == kleur1 or c2r1.fill == kleur3 or c2r1.fill == kleur4) {regel1grijs++} if(c1r2.fill == kleur2 or c1r2.fill == kleur3 or c1r2.fill == kleur4) {regel2grijs++} if(c2r2.fill == kleur1 or c2r2.fill == kleur3 or c2r2.fill == kleur4) {regel2grijs++} if(c1r3.fill == kleur2 or c1r3.fill == kleur3 or c1r3.fill == kleur4) {regel3grijs++} if(c2r3.fill == kleur1 or c2r3.fill == kleur3 or c2r3.fill == kleur4) {regel3grijs++} if(c1r4.fill == kleur2 or c1r4.fill == kleur3 or c1r4.fill == kleur4) {regel4grijs++} if(c2r4.fill == kleur1 or c2r4.fill == kleur3 or c2r4.fill == kleur4) {regel4grijs++} if(c1r5.fill == kleur2 or c1r5.fill == kleur3 or c1r5.fill == kleur4) {regel5grijs++} if(c2r5.fill == kleur1 or c2r5.fill == kleur3 or c2r5.fill == kleur4) {regel5grijs++} if(c1r6.fill == kleur2 or c1r6.fill == kleur3 or c1r6.fill == kleur4) {regel6grijs++} if(c2r6.fill == kleur1 or c2r6.fill == kleur3 or c2r6.fill == kleur4) {regel6grijs++} if(c1r7.fill == kleur2 or c1r7.fill == kleur3 or c1r7.fill == kleur4) {regel7grijs++} if(c2r7.fill == kleur1 or c2r7.fill == kleur3 or c2r7.fill == kleur4) {regel7grijs++} if(c1r8.fill == kleur2 or c1r8.fill == kleur3 or c1r8.fill == kleur4) {regel8grijs++} if(c2r8.fill == kleur1 or c2r8.fill == kleur3 or c2r8.fill == kleur4) {regel8grijs++} if(c1r9.fill == kleur2 or c1r9.fill == kleur3 or c1r9.fill == kleur4) {regel9grijs++} if(c2r9.fill == kleur1 or c2r9.fill == kleur3 or c2r9.fill == kleur4) {regel9grijs++} if(c1r10.fill == kleur2 or c1r10.fill == kleur3 or c1r10.fill == kleur4){regel10grijs++}if(c2r10.fill ==kleur1 or c2r10.fill == kleur3 or c2r10.fill == kleur4) {regel10grijs++} if(c3r1.fill == kleur1 or c3r1.fill == kleur2 or c3r1.fill == kleur4) {regel1grijs++} if(c4r1.fill == kleur1 or c4r1.fill == kleur2 or c4r1.fill == kleur3) {regel1grijs++} if(c3r2.fill == kleur1 or c3r2.fill == kleur2 or c3r2.fill == kleur4) {regel2grijs++} if(c4r2.fill == kleur1 or c4r2.fill == kleur2 or c4r2.fill == kleur3) {regel2grijs++} if(c3r3.fill == kleur1 or c3r3.fill == kleur2 or c3r3.fill == kleur4) {regel3grijs++} if(c4r3.fill == kleur1 or c4r3.fill == kleur2 or c4r3.fill == kleur3) {regel3grijs++} if(c3r4.fill == kleur1 or c3r4.fill == kleur2 or c3r4.fill == kleur4) {regel4grijs++} if(c4r4.fill == kleur1 or c4r4.fill == kleur2 or c4r4.fill == kleur3) {regel4grijs++} if(c3r5.fill == kleur1 or c3r5.fill == kleur2 or c3r5.fill == kleur4) {regel5grijs++} if(c4r5.fill == kleur1 or c4r5.fill == kleur2 or c4r5.fill == kleur3) {regel5grijs++} if(c3r6.fill == kleur1 or c3r6.fill == kleur2 or c3r6.fill == kleur4) {regel6grijs++} if(c4r6.fill == kleur1 or c2r6.fill == kleur2 or c4r6.fill == kleur3) {regel6grijs++} if(c3r7.fill == kleur1 or c3r7.fill == kleur2 or c3r7.fill == kleur4) {regel7grijs++} if(c4r7.fill == kleur1 or c2r7.fill == kleur2 or c4r7.fill == kleur3) {regel7grijs++} if(c3r8.fill == kleur1 or c3r8.fill == kleur2 or c3r8.fill == kleur4) {regel8grijs++} if(c4r8.fill == kleur1 or c4r8.fill == kleur2 or c4r8.fill == kleur3) {regel8grijs++} if(c3r9.fill == kleur1 or c3r9.fill == kleur2 or c3r9.fill == kleur4) {regel9grijs++} if(c4r9.fill == kleur1 or c4r9.fill == kleur2 or c4r9.fill == kleur3) {regel9grijs++} if(c3r10.fill == kleur1 or c3r10.fill == kleur2 or c3r10.fill == kleur4) {regel10grijs++}if(c4r10.fill ==kleur1 or c4r10.fill == kleur2 or c4r10.fill == kleur3) {regel10grijs++} //de code die de zwarte bolletjes invult if(regel1zwart ==1){k1r1.fill=Color.BLACK} if(regel1zwart ==2){k1r1.fill=Color.BLACK;k2r1.fill=Color.BLACK} if(regel1zwart ==3){k1r1.fill=Color.BLACK;k2r1.fill=Color.BLACK;k3r1.fill=Color.BLACK} if(regel1zwart ==4){k1r1.fill=Color.BLACK;k2r1.fill=Color.BLACK;k3r1.fill=Color.BLACK;k4r1.fill=Color.BLACK} if(regel2zwart ==1){k1r2.fill=Color.BLACK} if(regel2zwart ==2){k1r2.fill=Color.BLACK;k2r2.fill=Color.BLACK} if(regel2zwart ==3){k1r2.fill=Color.BLACK;k2r2.fill=Color.BLACK;k3r2.fill=Color.BLACK} if(regel2zwart ==4){k1r2.fill=Color.BLACK;k2r2.fill=Color.BLACK;k3r2.fill=Color.BLACK;k4r2.fill=Color.BLACK} if(regel3zwart ==1){k1r3.fill=Color.BLACK} if(regel3zwart ==2){k1r3.fill=Color.BLACK;k2r3.fill=Color.BLACK} if(regel3zwart ==3){k1r3.fill=Color.BLACK;k2r3.fill=Color.BLACK;k3r3.fill=Color.BLACK} if(regel3zwart ==4){k1r3.fill=Color.BLACK;k2r3.fill=Color.BLACK;k3r3.fill=Color.BLACK;k4r3.fill=Color.BLACK} if(regel4zwart ==1){k1r4.fill=Color.BLACK} if(regel4zwart ==2){k1r4.fill=Color.BLACK;k2r4.fill=Color.BLACK} if(regel4zwart ==3){k1r4.fill=Color.BLACK;k2r4.fill=Color.BLACK;k3r4.fill=Color.BLACK} if(regel4zwart ==4){k1r4.fill=Color.BLACK;k2r4.fill=Color.BLACK;k3r4.fill=Color.BLACK;k4r4.fill=Color.BLACK} if(regel5zwart ==1){k1r5.fill=Color.BLACK} if(regel5zwart ==2){k1r5.fill=Color.BLACK;k2r5.fill=Color.BLACK} if(regel5zwart ==3){k1r5.fill=Color.BLACK;k2r5.fill=Color.BLACK;k3r5.fill=Color.BLACK} if(regel5zwart ==4){k1r5.fill=Color.BLACK;k2r5.fill=Color.BLACK;k3r5.fill=Color.BLACK;k4r5.fill=Color.BLACK} if(regel6zwart ==1){k1r6.fill=Color.BLACK} if(regel6zwart ==2){k1r6.fill=Color.BLACK;k2r6.fill=Color.BLACK} if(regel6zwart ==3){k1r6.fill=Color.BLACK;k2r6.fill=Color.BLACK;k3r6.fill=Color.BLACK} if(regel6zwart ==4){k1r6.fill=Color.BLACK;k2r6.fill=Color.BLACK;k3r6.fill=Color.BLACK;k4r6.fill=Color.BLACK} if(regel7zwart ==1){k1r7.fill=Color.BLACK} if(regel7zwart ==2){k1r7.fill=Color.BLACK;k2r7.fill=Color.BLACK} if(regel7zwart ==3){k1r7.fill=Color.BLACK;k2r7.fill=Color.BLACK;k3r7.fill=Color.BLACK} if(regel7zwart ==4){k1r7.fill=Color.BLACK;k2r7.fill=Color.BLACK;k3r7.fill=Color.BLACK;k4r7.fill=Color.BLACK} if(regel8zwart ==1){k1r8.fill=Color.BLACK} if(regel8zwart ==2){k1r8.fill=Color.BLACK;k2r8.fill=Color.BLACK} if(regel8zwart ==3){k1r8.fill=Color.BLACK;k2r8.fill=Color.BLACK;k3r8.fill=Color.BLACK} if(regel8zwart ==4){k1r8.fill=Color.BLACK;k2r8.fill=Color.BLACK;k3r8.fill=Color.BLACK;k4r8.fill=Color.BLACK} if(regel9zwart ==1){k1r9.fill=Color.BLACK} if(regel9zwart ==2){k1r9.fill=Color.BLACK;k2r9.fill=Color.BLACK} if(regel9zwart ==3){k1r9.fill=Color.BLACK;k2r9.fill=Color.BLACK;k3r9.fill=Color.BLACK} if(regel9zwart ==4){k1r9.fill=Color.BLACK;k2r9.fill=Color.BLACK;k3r9.fill=Color.BLACK;k4r9.fill=Color.BLACK} if(regel10zwart ==1){k1r10.fill=Color.BLACK}if(regel10zwart ==2){k1r10.fill=Color.BLACK;k2r10.fill=Color.BLACK}if(regel10zwart ==3){k1r10.fill=Color.BLACK;k2r10.fill=Color.BLACK;k3r10.fill=Color.BLACK}if(regel10zwart ==4){k1r10.fill=Color.BLACK;k2r10.fill=Color.BLACK;k3r10.fill=Color.BLACK;k4r10.fill=Color.BLACK} //de code die nu checkt welke bolletjes nog wit zijn if(k1r1.fill == Color.WHITE){k1r1wit = true} if(k2r1.fill == Color.WHITE){k2r1wit = true} if(k3r1.fill == Color.WHITE){k3r1wit = true} if(k4r1.fill == Color.WHITE){k4r1wit = true} if(k1r2.fill == Color.WHITE){k1r2wit = true} if(k2r2.fill == Color.WHITE){k2r2wit = true} if(k3r2.fill == Color.WHITE){k3r2wit = true} if(k4r2.fill == Color.WHITE){k4r2wit = true} if(k1r3.fill == Color.WHITE){k1r3wit = true} if(k2r3.fill == Color.WHITE){k2r3wit = true} if(k3r3.fill == Color.WHITE){k3r3wit = true} if(k4r3.fill == Color.WHITE){k4r3wit = true} if(k1r4.fill == Color.WHITE){k1r4wit = true} if(k2r4.fill == Color.WHITE){k2r4wit = true} if(k3r4.fill == Color.WHITE){k3r4wit = true} if(k4r4.fill == Color.WHITE){k4r4wit = true} if(k1r5.fill == Color.WHITE){k1r5wit = true} if(k2r5.fill == Color.WHITE){k2r5wit = true} if(k3r5.fill == Color.WHITE){k3r5wit = true} if(k4r5.fill == Color.WHITE){k4r5wit = true} if(k1r6.fill == Color.WHITE){k1r6wit = true} if(k2r6.fill == Color.WHITE){k2r6wit = true} if(k3r6.fill == Color.WHITE){k3r6wit = true} if(k4r6.fill == Color.WHITE){k4r6wit = true} if(k1r7.fill == Color.WHITE){k1r7wit = true} if(k2r7.fill == Color.WHITE){k2r7wit = true} if(k3r7.fill == Color.WHITE){k3r7wit = true} if(k4r7.fill == Color.WHITE){k4r7wit = true} if(k1r8.fill == Color.WHITE){k1r8wit = true} if(k2r8.fill == Color.WHITE){k2r8wit = true} if(k3r8.fill == Color.WHITE){k3r8wit = true} if(k4r8.fill == Color.WHITE){k4r8wit = true} if(k1r9.fill == Color.WHITE){k1r9wit = true} if(k2r9.fill == Color.WHITE){k2r9wit = true} if(k3r9.fill == Color.WHITE){k3r9wit = true} if(k4r9.fill == Color.WHITE){k4r9wit = true} if(k1r10.fill == Color.WHITE){k1r10wit = true} if(k2r10.fill == Color.WHITE){k2r10wit = true} if(k3r10.fill == Color.WHITE){k3r10wit = true} if(k4r10.fill == Color.WHITE){k4r10wit = true} //de code die de de grijze bolletjes invult if(regel1grijs==1 and k1r1wit==true) {k1r1.fill=Color.GRAY}else if(regel1grijs==1 and k2r1wit==true) {k2r1.fill=Color.GRAY}else if(regel1grijs==1 and k3r1wit==true) {k3r1.fill=Color.GRAY}else if(regel1grijs==1 and k4r1wit==true) {k4r1.fill=Color.GRAY}; if(regel2grijs==1 and k1r2wit==true) {k1r2.fill=Color.GRAY}else if(regel2grijs==1 and k2r2wit==true) {k2r2.fill=Color.GRAY}else if(regel2grijs==1 and k3r2wit==true) {k3r2.fill=Color.GRAY}else if(regel2grijs==1 and k4r2wit==true) {k4r2.fill=Color.GRAY}; if(regel3grijs==1 and k1r3wit==true) {k1r3.fill=Color.GRAY}else if(regel3grijs==1 and k2r3wit==true) {k2r3.fill=Color.GRAY}else if(regel3grijs==1 and k3r3wit==true) {k3r3.fill=Color.GRAY}else if(regel3grijs==1 and k4r3wit==true) {k4r3.fill=Color.GRAY}; if(regel4grijs==1 and k1r4wit==true) {k1r4.fill=Color.GRAY}else if(regel4grijs==1 and k2r4wit==true) {k2r4.fill=Color.GRAY}else if(regel4grijs==1 and k3r4wit==true) {k3r4.fill=Color.GRAY}else if(regel4grijs==1 and k4r4wit==true) {k4r4.fill=Color.GRAY}; if(regel5grijs==1 and k1r5wit==true) {k1r5.fill=Color.GRAY}else if(regel5grijs==1 and k2r5wit==true) {k2r5.fill=Color.GRAY}else if(regel5grijs==1 and k3r5wit==true) {k3r5.fill=Color.GRAY}else if(regel5grijs==1 and k4r5wit==true) {k4r5.fill=Color.GRAY}; if(regel6grijs==1 and k1r6wit==true) {k1r6.fill=Color.GRAY}else if(regel6grijs==1 and k2r6wit==true) {k2r6.fill=Color.GRAY}else if(regel6grijs==1 and k3r6wit==true) {k3r6.fill=Color.GRAY}else if(regel6grijs==1 and k4r6wit==true) {k4r6.fill=Color.GRAY}; if(regel7grijs==1 and k1r7wit==true) {k1r7.fill=Color.GRAY}else if(regel7grijs==1 and k2r7wit==true) {k2r7.fill=Color.GRAY}else if(regel7grijs==1 and k3r7wit==true) {k3r7.fill=Color.GRAY}else if(regel7grijs==1 and k4r7wit==true) {k4r7.fill=Color.GRAY}; if(regel8grijs==1 and k1r8wit==true) {k1r8.fill=Color.GRAY}else if(regel8grijs==1 and k2r8wit==true) {k2r8.fill=Color.GRAY}else if(regel8grijs==1 and k3r8wit==true) {k3r8.fill=Color.GRAY}else if(regel8grijs==1 and k4r8wit==true) {k4r8.fill=Color.GRAY}; if(regel9grijs==1 and k1r9wit==true) {k1r9.fill=Color.GRAY}else if(regel9grijs==1 and k2r9wit==true) {k2r9.fill=Color.GRAY}else if(regel9grijs==1 and k3r9wit==true) {k3r9.fill=Color.GRAY}else if(regel9grijs==1 and k4r9wit==true) {k4r9.fill=Color.GRAY}; if(regel10grijs==1 and k1r10wit==true){k1r10.fill=Color.GRAY}else if(regel10grijs==1 and k2r10wit==true){k2r10.fill=Color.GRAY}else if(regel10grijs==1 and k3r10wit==true){k3r10.fill=Color.GRAY}else if(regel10grijs==1 and k4r10wit==true){k4r10.fill=Color.GRAY}; if(regel1grijs==2 and k1r1wit==true){k1r1.fill=Color.GREY;}else if(regel1grijs==2 and k2r1wit==true){k2r1.fill=Color.GREY;} else if(regel1grijs==2 and k3r1wit==true){k3r1.fill=Color.GREY;}else if(regel1grijs==2 and k4r1wit==true){k4r1.fill=Color.GREY;}; if(regel2grijs==2 and k1r2wit==true){k1r2.fill=Color.GREY;}else if(regel2grijs==2 and k2r2wit==true){k2r2.fill=Color.GREY;} else if(regel2grijs==2 and k3r2wit==true){k3r2.fill=Color.GREY;}else if(regel2grijs==2 and k4r2wit==true){k4r2.fill=Color.GREY;}; if(regel3grijs==2 and k1r3wit==true){k1r3.fill=Color.GREY;}else if(regel3grijs==2 and k2r3wit==true){k2r3.fill=Color.GREY;} else if(regel3grijs==2 and k3r3wit==true){k3r3.fill=Color.GREY;}else if(regel3grijs==2 and k4r3wit==true){k4r3.fill=Color.GREY;}; if(regel4grijs==2 and k1r4wit==true){k1r4.fill=Color.GREY;}else if(regel4grijs==2 and k2r4wit==true){k2r4.fill=Color.GREY;} else if(regel4grijs==2 and k3r4wit==true){k3r4.fill=Color.GREY;}else if(regel4grijs==2 and k4r4wit==true){k4r4.fill=Color.GREY;}; if(regel5grijs==2 and k1r5wit==true){k1r5.fill=Color.GREY;}else if(regel5grijs==2 and k2r5wit==true){k2r5.fill=Color.GREY;} else if(regel5grijs==2 and k3r5wit==true){k3r5.fill=Color.GREY;}else if(regel5grijs==2 and k4r5wit==true){k4r5.fill=Color.GREY;}; if(regel6grijs==2 and k1r6wit==true){k1r6.fill=Color.GREY;}else if(regel6grijs==2 and k2r6wit==true){k2r6.fill=Color.GREY;} else if(regel6grijs==2 and k3r6wit==true){k3r6.fill=Color.GREY;}else if(regel6grijs==2 and k4r6wit==true){k4r6.fill=Color.GREY;}; if(regel7grijs==2 and k1r7wit==true){k1r7.fill=Color.GREY;}else if(regel7grijs==2 and k2r7wit==true){k2r7.fill=Color.GREY;} else if(regel7grijs==2 and k3r7wit==true){k3r7.fill=Color.GREY;}else if(regel7grijs==2 and k4r7wit==true){k4r7.fill=Color.GREY;}; if(regel8grijs==2 and k1r8wit==true){k1r8.fill=Color.GREY;}else if(regel8grijs==2 and k2r8wit==true){k2r8.fill=Color.GREY;} else if(regel8grijs==2 and k3r8wit==true){k3r8.fill=Color.GREY;}else if(regel8grijs==2 and k4r8wit==true){k4r8.fill=Color.GREY;}; if(regel9grijs==2 and k1r9wit==true){k1r9.fill=Color.GREY;}else if(regel9grijs==2 and k2r9wit==true){k2r9.fill=Color.GREY;} else if(regel9grijs==2 and k3r9wit==true){k3r9.fill=Color.GREY;}else if(regel9grijs==2 and k4r9wit==true){k4r9.fill=Color.GREY;}; if(regel10grijs==2 and k1r10wit==true){k1r10.fill=Color.GREY;}else if(regel10grijs==2 and k2r10wit==true){k2r10.fill=Color.GREY;}else if(regel10grijs==2 and k3r10wit==true){k3r10.fill=Color.GREY;}else if(regel10grijs==2 and k4r10wit==true){k4r10.fill=Color.GREY;}; if(regel1grijs==3 and k1r1wit==true) {k1r1.fill=Color.GRAY;k2r1.fill=Color.GRAY;k3r1.fill=Color.GRAY;} else if(regel1grijs==3 and k2r1wit==true) {k2r1.fill=Color.GRAY;k3r1.fill=Color.GRAY;k4r1.fill=Color.GRAY;} if(regel2grijs==3 and k1r2wit==true) {k1r2.fill=Color.GRAY;k2r2.fill=Color.GRAY;k3r2.fill=Color.GRAY;} else if(regel2grijs==3 and k2r2wit==true) {k2r2.fill=Color.GRAY;k3r2.fill=Color.GRAY;k4r2.fill=Color.GRAY;} if(regel3grijs==3 and k1r3wit==true) {k1r3.fill=Color.GRAY;k2r3.fill=Color.GRAY;k3r3.fill=Color.GRAY;} else if(regel3grijs==3 and k2r3wit==true) {k2r3.fill=Color.GRAY;k3r3.fill=Color.GRAY;k4r3.fill=Color.GRAY;} if(regel4grijs==3 and k1r4wit==true) {k1r4.fill=Color.GRAY;k2r4.fill=Color.GRAY;k3r4.fill=Color.GRAY;} else if(regel4grijs==3 and k2r4wit==true) {k2r4.fill=Color.GRAY;k3r4.fill=Color.GRAY;k4r4.fill=Color.GRAY;} if(regel5grijs==3 and k1r5wit==true) {k1r5.fill=Color.GRAY;k2r5.fill=Color.GRAY;k3r5.fill=Color.GRAY;} else if(regel5grijs==3 and k2r5wit==true) {k2r5.fill=Color.GRAY;k3r5.fill=Color.GRAY;k4r5.fill=Color.GRAY;} if(regel6grijs==3 and k1r6wit==true) {k1r6.fill=Color.GRAY;k2r6.fill=Color.GRAY;k3r6.fill=Color.GREY;} else if(regel6grijs==3 and k2r6wit==true) {k2r6.fill=Color.GRAY;k3r6.fill=Color.GRAY;k4r6.fill=Color.GRAY;} if(regel7grijs==3 and k1r7wit==true) {k1r7.fill=Color.GRAY;k2r7.fill=Color.GRAY;k3r7.fill=Color.GRAY;} else if(regel7grijs==3 and k2r7wit==true) {k2r7.fill=Color.GRAY;k3r7.fill=Color.GRAY;k4r7.fill=Color.GREY;} if(regel8grijs==3 and k1r8wit==true) {k1r8.fill=Color.GRAY;k2r8.fill=Color.GRAY;k3r8.fill=Color.GRAY;} else if(regel8grijs==3 and k2r8wit==true) {k2r8.fill=Color.GRAY;k3r8.fill=Color.GRAY;k4r8.fill=Color.GRAY;} if(regel9grijs==3 and k1r9wit==true) {k1r9.fill=Color.GRAY;k2r9.fill=Color.GRAY;k3r9.fill=Color.GRAY;} else if(regel9grijs==3 and k2r9wit==true) {k2r9.fill=Color.GRAY;k3r9.fill=Color.GRAY;k4r9.fill=Color.GRAY;} if(regel10grijs==3 and k1r10wit==true){k1r10.fill=Color.GRAY;k2r10.fill=Color.GRAY;k3r10.fill=Color.GRAY;}else if(regel10grijs==3 and k2r10wit==true){k2r10.fill=Color.GRAY;k3r10.fill=Color.GRAY;k4r10.fill=Color.GRAY;} if(regel1grijs==4 and k1r1wit==true) {k1r1.fill=Color.GRAY;k2r1.fill=Color.GRAY;k3r1.fill=Color.GRAY;k4r1.fill=Color.GRAY;} if(regel2grijs==4 and k1r2wit==true) {k1r2.fill=Color.GRAY;k2r2.fill=Color.GRAY;k3r2.fill=Color.GRAY;k4r2.fill=Color.GRAY;} if(regel3grijs==4 and k1r3wit==true) {k1r3.fill=Color.GRAY;k2r3.fill=Color.GRAY;k3r3.fill=Color.GRAY;k4r3.fill=Color.GRAY;} if(regel4grijs==4 and k1r4wit==true) {k1r4.fill=Color.GRAY;k2r4.fill=Color.GRAY;k3r4.fill=Color.GRAY;k4r4.fill=Color.GRAY;} if(regel5grijs==4 and k1r5wit==true) {k1r5.fill=Color.GRAY;k2r5.fill=Color.GRAY;k3r5.fill=Color.GRAY;k4r5.fill=Color.GRAY;} if(regel6grijs==4 and k1r6wit==true) {k1r6.fill=Color.GREY;k2r6.fill=Color.GRAY;k3r6.fill=Color.GRAY;k4r6.fill=Color.GRAY;} if(regel7grijs==4 and k1r7wit==true) {k1r7.fill=Color.GRAY;k2r7.fill=Color.GRAY;k3r7.fill=Color.GRAY;k4r7.fill=Color.GRAY;} if(regel8grijs==4 and k1r8wit==true) {k1r8.fill=Color.GRAY;k2r8.fill=Color.GRAY;k3r8.fill=Color.GRAY;k4r8.fill=Color.GRAY;} if(regel9grijs==4 and k1r9wit==true) {k1r9.fill=Color.GRAY;k2r9.fill=Color.GRAY;k3r9.fill=Color.GRAY;k4r9.fill=Color.GRAY;} if(regel10grijs==4 and k1r10wit==true){k1r10.fill=Color.GRAY;k2r10.fill=Color.GRAY;k3r10.fill=Color.GRAY;k4r10.fill=Color.GRAY;} } } Rectangle {x: 460, y: 210 width: 135 height: 170arcWidth: 40 arcHeight: 40 stroke: Color.BLACKfill: LinearGradient {startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0,proportional: truestops: [stop {offset: 0.0 color: Color.LIGHTGRAY},Stop {offset: 1.0 color : Color.DARKGRAY}]}} //opnieuw knop nieuwbutton = Button { translateX: 300 translateY: 650 width:150 text: "Nieuw spel" action: function(){ randomnummer1 = Math.random(); randomnummer2 = Math.random(); randomnummer3 = Math.random(); randomnummer4 = Math.random(); regel1zwart=0;regel2zwart=0;regel3zwart=0;regel4zwart=0;regel5zwart=0;regel6zwart=0;regel7zwart=0;regel8zwart=0;regel9zwart=0;regel10zwart=0; regel1grijs=0;regel2grijs=0;regel3grijs=0;regel4grijs=0;regel5grijs=0;regel6grijs=0;regel7grijs=0;regel8grijs=0;regel9grijs=0;regel10grijs=0; //de randomkleurgen van kleur1 if((randomnummer1*6)>0 and (randomnummer1*6)<=1){ kleur1 =Color.MAGENTA } if((randomnummer1*6)>1 and (randomnummer1*6)<=2){ kleur1 = Color.RED } if((randomnummer1*6)>2 and (randomnummer1*6)<=3){ kleur1 =Color.BLUE } if((randomnummer1*6)>3 and (randomnummer1*6)<=4){ kleur1 = Color.GREEN } if((randomnummer1*6)>4 and (randomnummer1*6)<=5){ kleur1 =Color.ORANGE } if((randomnummer1*6)>5 and (randomnummer1*6)<=6){ kleur1 = Color.YELLOW } //de randomkleurgen voor kleur2 if((randomnummer2*6)>0 and (randomnummer2*6)<=1){ kleur2 =Color.MAGENTA } if((randomnummer2*6)>1 and (randomnummer2*6)<=2){ kleur2 = Color.RED } if((randomnummer2*6)>2 and (randomnummer2*6)<=3){ kleur2 =Color.BLUE } if((randomnummer2*6)>3 and (randomnummer2*6)<=4){ kleur2 = Color.GREEN } if((randomnummer2*6)>4 and (randomnummer2*6)<=5){ kleur2 =Color.ORANGE } if((randomnummer2*6)>5 and (randomnummer2*6)<=6){ kleur2 = Color.YELLOW } //de randomkleurgen voor kleur3 if((randomnummer3*6)>0 and (randomnummer3*6)<=1){ kleur3 =Color.MAGENTA } if((randomnummer3*6)>1 and (randomnummer3*6)<=2){ kleur3 = Color.RED } if((randomnummer3*6)>2 and (randomnummer3*6)<=3){ kleur3 =Color.BLUE } if((randomnummer3*6)>3 and (randomnummer3*6)<=4){ kleur3 = Color.GREEN } if((randomnummer3*6)>4 and (randomnummer3*6)<=5){ kleur3 =Color.ORANGE } if((randomnummer3*6)>5 and (randomnummer3*6)<=6){ kleur3 = Color.YELLOW } //de randomkleurgen voor kleur4 if((randomnummer4*6)>0 and (randomnummer4*6)<=1){ kleur4 =Color.MAGENTA } if((randomnummer4*6)>1 and (randomnummer4*6)<=2){ kleur4 = Color.RED } if((randomnummer4*6)>2 and (randomnummer4*6)<=3){ kleur4 =Color.BLUE } if((randomnummer4*6)>3 and (randomnummer4*6)<=4){ kleur4 = Color.GREEN } if((randomnummer4*6)>4 and (randomnummer4*6)<=5){ kleur4 =Color.ORANGE } if((randomnummer4*6)>5 and (randomnummer4*6)<=6){ kleur4 = Color.YELLOW } c1r1.fill=Color.WHITE;c1r2.fill=Color.WHITE;c1r3.fill=Color.WHITE;c1r4.fill=Color.WHITE;c1r5.fill=Color.WHITE; c1r6.fill=Color.WHITE;c1r7.fill=Color.WHITE;c1r8.fill=Color.WHITE;c1r9.fill=Color.WHITE;c1r10.fill=Color.WHITE; c2r1.fill=Color.WHITE;c2r2.fill=Color.WHITE;c2r3.fill=Color.WHITE;c2r4.fill=Color.WHITE;c2r5.fill=Color.WHITE; c2r6.fill=Color.WHITE;c2r7.fill=Color.WHITE;c2r8.fill=Color.WHITE;c2r9.fill=Color.WHITE;c2r10.fill=Color.WHITE; c3r1.fill=Color.WHITE;c3r2.fill=Color.WHITE;c3r3.fill=Color.WHITE;c3r4.fill=Color.WHITE;c3r5.fill=Color.WHITE; c3r6.fill=Color.WHITE;c3r7.fill=Color.WHITE;c3r8.fill=Color.WHITE;c3r9.fill=Color.WHITE;c3r10.fill=Color.WHITE; c4r1.fill=Color.WHITE;c4r2.fill=Color.WHITE;c4r3.fill=Color.WHITE;c4r4.fill=Color.WHITE;c4r5.fill=Color.WHITE; c4r6.fill=Color.WHITE;c4r7.fill=Color.WHITE;c4r8.fill=Color.WHITE;c4r9.fill=Color.WHITE;c4r10.fill=Color.WHITE; k1r1.fill=Color.WHITE;k1r2.fill=Color.WHITE;k1r3.fill=Color.WHITE;k1r4.fill=Color.WHITE;k1r5.fill=Color.WHITE; k1r6.fill=Color.WHITE;k1r7.fill=Color.WHITE;k1r8.fill=Color.WHITE;k1r9.fill=Color.WHITE;k1r10.fill=Color.WHITE; k2r1.fill=Color.WHITE;k2r2.fill=Color.WHITE;k2r3.fill=Color.WHITE;k2r4.fill=Color.WHITE;k2r5.fill=Color.WHITE; k2r6.fill=Color.WHITE;k2r7.fill=Color.WHITE;k2r8.fill=Color.WHITE;k2r9.fill=Color.WHITE;k2r10.fill=Color.WHITE; k3r1.fill=Color.WHITE;k3r2.fill=Color.WHITE;k3r3.fill=Color.WHITE;k3r4.fill=Color.WHITE;k3r5.fill=Color.WHITE; k3r6.fill=Color.WHITE;k3r7.fill=Color.WHITE;k3r8.fill=Color.WHITE;k3r9.fill=Color.WHITE;k3r10.fill=Color.WHITE; k4r1.fill=Color.WHITE;k4r2.fill=Color.WHITE;k4r3.fill=Color.WHITE;k4r4.fill=Color.WHITE;k4r5.fill=Color.WHITE; k4r6.fill=Color.WHITE;k4r7.fill=Color.WHITE;k4r8.fill=Color.WHITE;k4r9.fill=Color.WHITE;k4r10.fill=Color.WHITE; wintext.visible = false } } //de kleurencirkels magentacircle = Circle { centerX: 500, centerY: 245 radius: 22.5 strokeWidth: 5.0 stroke: Color.BLACK fill: Color.MAGENTA onMouseClicked: function (e: MouseEvent): Void { //de code om te bepalen of en welke cirkels roze moeten worden if(c1r1.fill == Color.WHITE){ c1r1.fill = Color.MAGENTA } else if(c2r1.fill == Color.WHITE and c1r1wit == not true ){ c2r1.fill = Color.MAGENTA } else if(c3r1.fill == Color.WHITE and c2r1wit == not true){ c3r1.fill = Color.MAGENTA } else if(c4r1.fill == Color.WHITE and c3r1wit == not true){ c4r1.fill = Color.MAGENTA } //de 2e regel roze maken else if(c1r2.fill == Color.WHITE and c4r1wit == not true){ c1r2.fill = Color.MAGENTA } else if(c2r2.fill == Color.WHITE and c1r2wit == not true){ c2r2.fill = Color.MAGENTA } else if(c3r2.fill == Color.WHITE and c2r2wit == not true){ c3r2.fill = Color.MAGENTA } else if(c4r2.fill == Color.WHITE and c3r2wit == not true){ c4r2.fill = Color.MAGENTA } //de 3e regel roze maken else if(c1r3.fill == Color.WHITE and c4r2wit == not true){ c1r3.fill = Color.MAGENTA } else if(c2r3.fill == Color.WHITE and c1r3wit == not true){ c2r3.fill = Color.MAGENTA } else if(c3r3.fill == Color.WHITE and c2r3wit == not true){ c3r3.fill = Color.MAGENTA } else if(c4r3.fill == Color.WHITE and c3r3wit == not true){ c4r3.fill = Color.MAGENTA } //de 4e regel roze maken else if(c1r4.fill == Color.WHITE and c4r3wit == not true){ c1r4.fill = Color.MAGENTA } else if(c2r4.fill == Color.WHITE and c1r4wit == not true){ c2r4.fill = Color.MAGENTA } else if(c3r4.fill == Color.WHITE and c2r4wit == not true){ c3r4.fill = Color.MAGENTA } else if(c4r4.fill == Color.WHITE and c3r4wit == not true){ c4r4.fill = Color.MAGENTA } //de 5e regel roze maken else if(c1r5.fill == Color.WHITE and c4r4wit == not true){ c1r5.fill = Color.MAGENTA } else if(c2r5.fill == Color.WHITE and c1r5wit == not true){ c2r5.fill = Color.MAGENTA } else if(c3r5.fill == Color.WHITE and c2r5wit == not true){ c3r5.fill = Color.MAGENTA } else if(c4r5.fill == Color.WHITE and c3r5wit == not true){ c4r5.fill = Color.MAGENTA } //de 6e regel roze maken else if(c1r6.fill == Color.WHITE and c4r5wit == not true){ c1r6.fill = Color.MAGENTA } else if(c2r6.fill == Color.WHITE and c1r6wit == not true){ c2r6.fill = Color.MAGENTA } else if(c3r6.fill == Color.WHITE and c2r6wit == not true){ c3r6.fill = Color.MAGENTA } else if(c4r6.fill == Color.WHITE and c3r6wit == not true){ c4r6.fill = Color.MAGENTA } //de code om cirkels in de zevende regel roze te maken else if(c1r7.fill == Color.WHITE and c4r6wit == not true){ c1r7.fill = Color.MAGENTA } else if(c2r7.fill == Color.WHITE and c1r7wit == not true){ c2r7.fill = Color.MAGENTA } else if(c3r7.fill == Color.WHITE and c2r7wit == not true){ c3r7.fill = Color.MAGENTA } else if(c4r7.fill == Color.WHITE and c3r7wit == not true){ c4r7.fill = Color.MAGENTA } //de code om cirkels in de 8e regel roze te maken else if(c1r8.fill == Color.WHITE and c4r7wit == not true){ c1r8.fill = Color.MAGENTA } else if(c2r8.fill == Color.WHITE and c1r8wit == not true){ c2r8.fill = Color.MAGENTA } else if(c3r8.fill == Color.WHITE and c2r8wit == not true){ c3r8.fill = Color.MAGENTA } else if(c4r8.fill == Color.WHITE and c3r8wit == not true){ c4r8.fill = Color.MAGENTA } //de code om cirkels in de 9e regel roze te maken else if(c1r9.fill == Color.WHITE and c4r7wit == not true){ c1r9.fill = Color.MAGENTA } else if(c2r9.fill == Color.WHITE and c1r8wit == not true){ c2r9.fill = Color.MAGENTA } else if(c3r9.fill == Color.WHITE and c2r8wit == not true){ c3r9.fill = Color.MAGENTA } else if(c4r9.fill == Color.WHITE and c3r8wit == not true){ c4r9.fill = Color.MAGENTA } //de code om in de laatste regel cirkels roze te maken else if(c1r10.fill == Color.WHITE and c4r9wit == not true){ c1r10.fill = Color.MAGENTA } else if(c2r10.fill == Color.WHITE and c1r10wit == not true){ c2r10.fill = Color.MAGENTA } else if(c3r10.fill == Color.WHITE and c2r10wit == not true){ c3r10.fill = Color.MAGENTA } else if(c4r10.fill == Color.WHITE and c3r10wit == not true){ c4r10.fill = Color.MAGENTA } } onMousePressed: function (e: MouseEvent): Void { magentacircle.stroke = Color.WHITE; } onMouseReleased: function (e: MouseEvent): Void { magentacircle.stroke = Color.BLACK; } } redcircle = Circle { centerX: 500, centerY: 295 radius: 22.5 strokeWidth: 5.0 stroke: Color.BLACK fill: Color.RED onMouseClicked: function (e: MouseEvent): Void { //de code om te bepalen of en welke cirkels rood moeten worden if(c1r1.fill == Color.WHITE){ c1r1.fill = Color.RED } else if(c2r1.fill == Color.WHITE and c1r1wit == not true ){ c2r1.fill = Color.RED } else if(c3r1.fill == Color.WHITE and c2r1wit == not true){ c3r1.fill = Color.RED } else if(c4r1.fill == Color.WHITE and c3r1wit == not true){ c4r1.fill = Color.RED } //de 2e regel rood maken else if(c1r2.fill == Color.WHITE and c4r1wit == not true){ c1r2.fill = Color.RED } else if(c2r2.fill == Color.WHITE and c1r2wit == not true){ c2r2.fill = Color.RED } else if(c3r2.fill == Color.WHITE and c2r2wit == not true){ c3r2.fill = Color.RED } else if(c4r2.fill == Color.WHITE and c3r2wit == not true){ c4r2.fill = Color.RED } //de 3e regel rood maken else if(c1r3.fill == Color.WHITE and c4r2wit == not true){ c1r3.fill = Color.RED } else if(c2r3.fill == Color.WHITE and c1r3wit == not true){ c2r3.fill = Color.RED } else if(c3r3.fill == Color.WHITE and c2r3wit == not true){ c3r3.fill = Color.RED } else if(c4r3.fill == Color.WHITE and c3r3wit == not true){ c4r3.fill = Color.RED } //de 4e regel rood maken else if(c1r4.fill == Color.WHITE and c4r3wit == not true){ c1r4.fill = Color.RED } else if(c2r4.fill == Color.WHITE and c1r4wit == not true){ c2r4.fill = Color.RED } else if(c3r4.fill == Color.WHITE and c2r4wit == not true){ c3r4.fill = Color.RED } else if(c4r4.fill == Color.WHITE and c3r4wit == not true){ c4r4.fill = Color.RED } //de 5e regel rood maken else if(c1r5.fill == Color.WHITE and c4r4wit == not true){ c1r5.fill = Color.RED } else if(c2r5.fill == Color.WHITE and c1r5wit == not true){ c2r5.fill = Color.RED } else if(c3r5.fill == Color.WHITE and c2r5wit == not true){ c3r5.fill = Color.RED } else if(c4r5.fill == Color.WHITE and c3r5wit == not true){ c4r5.fill = Color.RED } //de 6e regel rood maken else if(c1r6.fill == Color.WHITE and c4r5wit == not true){ c1r6.fill = Color.RED } else if(c2r6.fill == Color.WHITE and c1r6wit == not true){ c2r6.fill = Color.RED } else if(c3r6.fill == Color.WHITE and c2r6wit == not true){ c3r6.fill = Color.RED } else if(c4r6.fill == Color.WHITE and c3r6wit == not true){ c4r6.fill = Color.RED } //de code om cirkels in de zevende regel rood te maken else if(c1r7.fill == Color.WHITE and c4r6wit == not true){ c1r7.fill = Color.RED } else if(c2r7.fill == Color.WHITE and c1r7wit == not true){ c2r7.fill = Color.RED } else if(c3r7.fill == Color.WHITE and c2r7wit == not true){ c3r7.fill = Color.RED } else if(c4r7.fill == Color.WHITE and c3r7wit == not true){ c4r7.fill = Color.RED } //de code om cirkels in de 8e regel rood te maken else if(c1r8.fill == Color.WHITE and c4r7wit == not true){ c1r8.fill = Color.RED } else if(c2r8.fill == Color.WHITE and c1r8wit == not true){ c2r8.fill = Color.RED } else if(c3r8.fill == Color.WHITE and c2r8wit == not true){ c3r8.fill = Color.RED } else if(c4r8.fill == Color.WHITE and c3r8wit == not true){ c4r8.fill = Color.RED } //de code om cirkels in de 9e regel rood te maken else if(c1r9.fill == Color.WHITE and c4r7wit == not true){ c1r9.fill = Color.RED } else if(c2r9.fill == Color.WHITE and c1r8wit == not true){ c2r9.fill = Color.RED } else if(c3r9.fill == Color.WHITE and c2r8wit == not true){ c3r9.fill = Color.RED } else if(c4r9.fill == Color.WHITE and c3r8wit == not true){ c4r9.fill = Color.RED } //de code om in de laatste regel cirkels rood te maken else if(c1r10.fill == Color.WHITE and c4r9wit == not true){ c1r10.fill = Color.RED } else if(c2r10.fill == Color.WHITE and c1r10wit == not true){ c2r10.fill = Color.RED } else if(c3r10.fill == Color.WHITE and c2r10wit == not true){ c3r10.fill = Color.RED } else if(c4r10.fill == Color.WHITE and c3r10wit == not true){ c4r10.fill = Color.RED } } onMousePressed: function (e: MouseEvent): Void { redcircle.stroke = Color.WHITE; } onMouseReleased: function (e: MouseEvent): Void { redcircle.stroke = Color.BLACK; } } orangecircle = Circle { centerX: 500, centerY: 345 radius: 22.5 strokeWidth: 5.0 stroke: Color.BLACK fill: Color.ORANGE onMouseClicked: function (e: MouseEvent): Void { //de code om te bepalen of en welke cirkels oranje moeten worden if(c1r1.fill == Color.WHITE){ c1r1.fill = Color.ORANGE } else if(c2r1.fill == Color.WHITE and c1r1wit == not true ){ c2r1.fill = Color.ORANGE } else if(c3r1.fill == Color.WHITE and c2r1wit == not true){ c3r1.fill = Color.ORANGE } else if(c4r1.fill == Color.WHITE and c3r1wit == not true){ c4r1.fill = Color.ORANGE } //de 2e regel oranje maken else if(c1r2.fill == Color.WHITE and c4r1wit == not true){ c1r2.fill = Color.ORANGE } else if(c2r2.fill == Color.WHITE and c1r2wit == not true){ c2r2.fill = Color.ORANGE } else if(c3r2.fill == Color.WHITE and c2r2wit == not true){ c3r2.fill = Color.ORANGE } else if(c4r2.fill == Color.WHITE and c3r2wit == not true){ c4r2.fill = Color.ORANGE } //de 3e regel oranje maken else if(c1r3.fill == Color.WHITE and c4r2wit == not true){ c1r3.fill = Color.ORANGE } else if(c2r3.fill == Color.WHITE and c1r3wit == not true){ c2r3.fill = Color.ORANGE } else if(c3r3.fill == Color.WHITE and c2r3wit == not true){ c3r3.fill = Color.ORANGE } else if(c4r3.fill == Color.WHITE and c3r3wit == not true){ c4r3.fill = Color.ORANGE } //de 4e regel oranje maken else if(c1r4.fill == Color.WHITE and c4r3wit == not true){ c1r4.fill = Color.ORANGE } else if(c2r4.fill == Color.WHITE and c1r4wit == not true){ c2r4.fill = Color.ORANGE } else if(c3r4.fill == Color.WHITE and c2r4wit == not true){ c3r4.fill = Color.ORANGE } else if(c4r4.fill == Color.WHITE and c3r4wit == not true){ c4r4.fill = Color.ORANGE } //de 5e regel oranje maken else if(c1r5.fill == Color.WHITE and c4r4wit == not true){ c1r5.fill = Color.ORANGE } else if(c2r5.fill == Color.WHITE and c1r5wit == not true){ c2r5.fill = Color.ORANGE } else if(c3r5.fill == Color.WHITE and c2r5wit == not true){ c3r5.fill = Color.ORA

Share this post


Link to post
Share on other sites

Wow, huge code, why don't use array, for loop ... to shorten it Anyway, I had some looks if(c1r1.fill == Color.WHITE){c1r1.fill = Color.MAGENTA}else if(c2r1.fill == Color.WHITE and c1r1wit == false ){c2r1.fill = Color.MAGENTA/* Why not c2r1wit = false here */} if(c1r1.fill == Color.WHITE){c1r1wit = true} /* why not else{c1r1wit = false} here */ if(k1r1.fill == Color.WHITE){k1r1wit = true} /* why not else{k1r1wit = false} here */ :)

Edited by smiles

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×