Re: [racket-users] Hello everybody, i need help again :( sorry but i dont know much of Racket

2015-12-01 Thread Alejandro López
El lunes, 30 de noviembre de 2015, 19:02:35 (UTC-5), Matthias Felleisen 
escribió:
> Don't use the old X graphics library. Use
>  
>  #lang racket/gui 
> 
> instead. -- Matthias
> 
> 
> 
> On Nov 30, 2015, at 3:51 PM, Alejandro López  wrote:
> 
> > I have this code:
> > 
> > 
> > #lang racket
> > ;purpose
> > ;Creating play noughts and crosses
> > 
> > ;Include graphics library
> > (require (lib "Graphics.ss" "graphics"))
> > 
> > ;Open graphics library
> > (open-graphics)
> > 
> > ;Create window
> > (define window (open-viewport "three in one" 500 500))
> > 
> > ;background color
> > ((draw-viewport window) "black")
> > 
> > ;Give a name or title to the play in this case three in a row
> > ((draw-string window) (make-posn 200 75) "Tic Tac Toe" "white")
> > 
> > ; Draw the game board
> > ((draw-rectangle window) (make-posn 100 100) 100 100 "white")
> > ((draw-rectangle window) (make-posn 100 200) 100 100 "white")
> > ((draw-rectangle window) (make-posn 100 300) 100 100 "white")
> > ((draw-rectangle window) (make-posn 200 100) 100 100 "white")
> > ((draw-rectangle window) (make-posn 200 200) 100 100 "white")
> > ((draw-rectangle window) (make-posn 200 300) 100 100 "white")
> > ((draw-rectangle window) (make-posn 300 100) 100 100 "white")
> > ((draw-rectangle window) (make-posn 300 200) 100 100 "white")
> > ((draw-rectangle window) (make-posn 300 300) 100 100 "white")
> > 
> > ;Frames game
> > ((draw-rectangle window) (make-posn 95 95) 310 310 "white")
> > ((draw-rectangle window) (make-posn 50 50) 400 400 "white")
> > 
> > I have to make a game of " tic tac toe" and I have no idea how to make to 
> > click left of the mouse and show a square display an X and then another 
> > square to left click with the mouse and it then appears one O, and 
> > right-click on any square with a picture and let clean that square.
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.

But i need this in the old library

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Hello everybody, i need help again :( sorry but i dont know much of Racket

2015-12-01 Thread Alejandro López
But i need this in the old library :(

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Hello everybody, i need help again :( sorry but i dont know much of Racket

2015-11-30 Thread Alejandro López
I have this code:


;purpose
;Creating play noughts and crosses

;Include graphics library
(Require (lib "Graphics.ss" "graphics"))

;Open graphics library
(Open-graphics)

;Create window
(Define window (open-viewport "three in one" 500 500))

;background color
((Draw-viewport window) "black")

;Give a name or title to the play in this case three in a row
((Draw-string window) (make-posn 200 75) "Tic Tac Toe" "white")

; Draw the game board
((Draw-rectangle window) (make-posn 100 100) 100 100 "white")
((Draw-rectangle window) (make-posn 100 200) 100 100 "white")
((Draw-rectangle window) (make-posn 100 300) 100 100 "white")
((Draw-rectangle window) (make-posn 200 100) 100 100 "white")
((Draw-rectangle window) (make-posn 200 200) 100 100 "white")
((Draw-rectangle window) (make-posn 200 300) 100 100 "white")
((Draw-rectangle window) (make-posn 300 100) 100 100 "white")
((Draw-rectangle window) (make-posn 300 200) 100 100 "white")
((Draw-rectangle window) (make-posn 300 300) 100 100 "white")

;Frames game
((Draw-rectangle window) (make-posn 95 95) 310 310 "white")
((Draw-rectangle window) (make-posn 50 50) 400 400 "white")

I have to make a game of " tic tac toe" and I have no idea how to make to click 
left of the mouse and show a square display an X and then another square to 
left click with the mouse and it then appears one O, and right-click on any 
square with a picture and let clean that square.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Hello everybody, i need help again :( sorry but i dont know much of Racket

2015-11-30 Thread Alejandro López
I have this code:


#lang racket
;purpose
;Creating play noughts and crosses

;Include graphics library
(require (lib "Graphics.ss" "graphics"))

;Open graphics library
(open-graphics)

;Create window
(define window (open-viewport "three in one" 500 500))

;background color
((draw-viewport window) "black")

;Give a name or title to the play in this case three in a row
((draw-string window) (make-posn 200 75) "Tic Tac Toe" "white")

; Draw the game board
((draw-rectangle window) (make-posn 100 100) 100 100 "white")
((draw-rectangle window) (make-posn 100 200) 100 100 "white")
((draw-rectangle window) (make-posn 100 300) 100 100 "white")
((draw-rectangle window) (make-posn 200 100) 100 100 "white")
((draw-rectangle window) (make-posn 200 200) 100 100 "white")
((draw-rectangle window) (make-posn 200 300) 100 100 "white")
((draw-rectangle window) (make-posn 300 100) 100 100 "white")
((draw-rectangle window) (make-posn 300 200) 100 100 "white")
((draw-rectangle window) (make-posn 300 300) 100 100 "white")

;Frames game
((draw-rectangle window) (make-posn 95 95) 310 310 "white")
((draw-rectangle window) (make-posn 50 50) 400 400 "white")

I have to make a game of " tic tac toe" and I have no idea how to make to click 
left of the mouse and show a square display an X and then another square to 
left click with the mouse and it then appears one O, and right-click on any 
square with a picture and let clean that square.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Hello everybody, i need help again :( sorry but i dont know much of Racket

2015-11-30 Thread Matthias Felleisen

Don't use the old X graphics library. Use
 
 #lang racket/gui 

instead. -- Matthias



On Nov 30, 2015, at 3:51 PM, Alejandro López  wrote:

> I have this code:
> 
> 
> #lang racket
> ;purpose
> ;Creating play noughts and crosses
> 
> ;Include graphics library
> (require (lib "Graphics.ss" "graphics"))
> 
> ;Open graphics library
> (open-graphics)
> 
> ;Create window
> (define window (open-viewport "three in one" 500 500))
> 
> ;background color
> ((draw-viewport window) "black")
> 
> ;Give a name or title to the play in this case three in a row
> ((draw-string window) (make-posn 200 75) "Tic Tac Toe" "white")
> 
> ; Draw the game board
> ((draw-rectangle window) (make-posn 100 100) 100 100 "white")
> ((draw-rectangle window) (make-posn 100 200) 100 100 "white")
> ((draw-rectangle window) (make-posn 100 300) 100 100 "white")
> ((draw-rectangle window) (make-posn 200 100) 100 100 "white")
> ((draw-rectangle window) (make-posn 200 200) 100 100 "white")
> ((draw-rectangle window) (make-posn 200 300) 100 100 "white")
> ((draw-rectangle window) (make-posn 300 100) 100 100 "white")
> ((draw-rectangle window) (make-posn 300 200) 100 100 "white")
> ((draw-rectangle window) (make-posn 300 300) 100 100 "white")
> 
> ;Frames game
> ((draw-rectangle window) (make-posn 95 95) 310 310 "white")
> ((draw-rectangle window) (make-posn 50 50) 400 400 "white")
> 
> I have to make a game of " tic tac toe" and I have no idea how to make to 
> click left of the mouse and show a square display an X and then another 
> square to left click with the mouse and it then appears one O, and 
> right-click on any square with a picture and let clean that square.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.