A boardgame
From: Linio (Linio_at_seventeen.com)
Date: 03/24/05
- Next message: skubik: "Packages & JARs"
- Previous message: root: "Re: How to get tomcat path in Java"
- Next in thread: hernan rancati: "Re: A boardgame"
- Reply: hernan rancati: "Re: A boardgame"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 24 Mar 2005 17:06:34 +0100
Hello i know it may sounds stupid, but i'm currently working on a boardgame
on a grid of 20*20 squares and i'd like to write a function to know which
squares are between two square in parameter like this:
public Vector checkBetween(int X1, int Y1, int X2, int Y2);
and by calling it on for example checkBetween(18,6,15,9) in return i have
(17,7) and (16,8).
I tried to figure out a way of doing this by using a polygon but it doesn't
work at all, when i call the function on a straight line (like (15,5) and
(15,10) I have nothing in return when i call the function contains on my
polygon...
I hope I was clear because I ... am clearly not.
If someone could help me out I would appreciate.
Linio.
- Next message: skubik: "Packages & JARs"
- Previous message: root: "Re: How to get tomcat path in Java"
- Next in thread: hernan rancati: "Re: A boardgame"
- Reply: hernan rancati: "Re: A boardgame"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|