//a basic two-player game ( ~txt = "abcdefgh".scramble.clump(4); g = TDAT_Game.new(~txt, []); ~rsetz = [ Dictionary.new.add("a" -> 0).add("b" -> 1), Dictionary.new.add("e" -> 0).add("f" -> 1) ]; ~rsetz.do{|rulz| TDAT_Player.new(g, rulz, 0, 0) }; //~window = GUI.window.new("hihihi").front; //~text_boxes = g.players.collect{|player, index| // GUI.textField.new(~window, Rect(index*80 + 10, 10, 70, 70)); // index = index + 1; // } ~routines = g.players.collect{|player, index| Routine({ loop({ "//=================================".postln; player.turn; if(player.index > (~txt[0].size - 1), { player.index = 0 }); ~window.refresh; wait(0.5.rand); }) }) } ) ~routines.do({|x| x.play}); ~routines.do({|x| x.stop});