Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #22284

Re: Converting Text File To Rectangles

Date 2013-02-12 12:14 +0000
From lipska the kat <"nospam at neversurrender dot co dot uk">
Organization Trollbusters 3
Newsgroups comp.lang.java.programmer
Subject Re: Converting Text File To Rectangles
References <7f49c487-f016-43a3-83a4-feebe072f76c@googlegroups.com> <hknSs.136174$EO2.136144@newsfe04.iad>
Message-ID <CPadnai5MOXZr4fMnZ2dnUVZ8rudnZ2d@bt.com> (permalink)

Show all headers | View raw


On 12/02/13 08:47, Arved Sandstrom wrote:
> On 02/11/2013 09:51 PM, Scyth3 wrote:
>> I have a save and load method for certain rectangles I need for a
>> game. Say the user wants to save a map. The outputted map would look
>> like this:

[snip]

>
> Do you even have a rectangle class ready to go?

I thought of this (a Rectangle class) but went with RectData
because to my mind, abstractly, a Rectangle is just a length and a width 
and wouldn't contain coordinates and I was going 'quick and dirty'. I 
suppose a better way might be

class Rectangle{
    length, width
    ...
}

class Coord{
    x,y
    ...
}

class CoordinatedRectangle{
    Rectangle rect
    Coord coord
    ...
}


But I'm sure you have/had a better idea.

lipska

-- 
Lipska the Kat©: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Converting Text File To Rectangles Scyth3 <zfollette@gmail.com> - 2013-02-11 17:51 -0800
  Re: Converting Text File To Rectangles Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-02-11 21:02 -0500
    Re: Converting Text File To Rectangles Gene Wirchenko <genew@telus.net> - 2013-02-13 09:06 -0800
      Re: Converting Text File To Rectangles Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-02-13 13:25 -0500
        Re: Converting Text File To Rectangles "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-02-15 15:25 +0000
          Re: Converting Text File To Rectangles "John B. Matthews" <nospam@nospam.invalid> - 2013-02-16 13:37 -0500
            [OT] Re: Converting Text File To Rectangles Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-02-16 15:16 -0500
              Re: [OT] Re: Converting Text File To Rectangles "John B. Matthews" <nospam@nospam.invalid> - 2013-02-17 14:16 -0500
        Re: Converting Text File To Rectangles Gene Wirchenko <genew@telus.net> - 2013-02-15 13:09 -0800
  Re: Converting Text File To Rectangles Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-02-12 04:47 -0400
    Re: Converting Text File To Rectangles lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-02-12 12:14 +0000
  Re: Converting Text File To Rectangles lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-02-12 09:47 +0000
    Re: Converting Text File To Rectangles lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-02-12 09:50 +0000
    Re: Converting Text File To Rectangles Roedy Green <see_website@mindprod.com.invalid> - 2013-02-12 18:23 -0800
  Re: Converting Text File To Rectangles Roedy Green <see_website@mindprod.com.invalid> - 2013-02-12 11:41 -0800

csiph-web