Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 help with filling grid boxes
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
insanesniper23




PostPosted: Wed Dec 10, 2014 9:59 am   Post subject: help with filling grid boxes

What is the problem you are having?
<hey there im trying to figure out how to drawfill between two already filled boxes in a 20 by 20 black grid i have it so the user clicks on a square of the grid for the start and then click on another square after that i want it to fill the space in between those two colored squares>



Battleship Grid.t
 Description:
i know it seems awfuly repetative but i have been mucking around with it for a while

Download
 Filename:  Battleship Grid.t
 Filesize:  2.83 KB
 Downloaded:  109 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Dreadnought




PostPosted: Wed Dec 10, 2014 1:27 pm   Post subject: Re: help with filling grid boxes

Suppose that your squares are from (a1,b2) to (a2,b2) and from (x1,y1) to (x2,y2) then you can fill in the area from (min(a1,a2,x1,x2), min(b1,b2,y1,y2)) to ((max(a1,a2,x1,x2), max(b1,b2,y1,y2)).
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: