Re: tictactoe




Rhino wrote:
> "CPSCmajor" <bmerritt1987@xxxxxxxxx> wrote in message
> news:1130615466.252620.216950@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > I have no idea where to even start on this...
> > Any suggestions?
> >
> > In this problem, you will modify the TicTacToe class from the textbook.
> > Add a method flipVertical that flips the board position along the
> > vertical axis. For example, the position
> > x x o
> > o
> > x
> > is flipped to
> > o x x
> > o
> > x
> > This is not useful for playing the game, but it can be useful for
> > recognizing a winning strategy in a database of strategies.
> >
> > Also supply a flipHorizontal method that would flip the original
> > position to
> > x
> > o
> > x x o
> > (Hint: If you are clever and understand how two-dimensional arrays are
> > implemented as "arrays of arrays", this method can be much simpler than
> > the vertical flip.)
> >
> > What is your implementation of the flipVertical and flipHorizontal
> > methods?
> >
> I'm sorry but that is just so simple that I can't believe you don't know how
> to do that. It seems a lot more likely that you are simply asking us to
> write your homework for you. Surely even a novice Java programmer can create
> a new array based on an existing array where the new one has x's where the
> old one had o's (and vice versa) and where the spaces are still spaces. If
> not, you need some serious one-on-one tutoring with someone who can review
> the basics with you.
>
> Rhino

Ok if I thought it was that easy then I would do it, obviously! I'm not
trying to get people to do my homework, I just asked for any
suggestions, not to be insulted.

.



Relevant Pages

  • Re: tictactoe
    ... Rhino wrote: ... >> Also supply a flipHorizontal method that would flip the original ... > write your homework for you. ... > a new array based on an existing array where the new one has x's where the ...
    (comp.lang.java.help)
  • Re: convert array into arraylist
    ... "Rhino" wrote in message ... >> Call me stupud but I can't find anything in the standard java runtime ... >> lets me convert an array into an arrayList ... > public class CollectionConversions { ...
    (comp.lang.java.programmer)
  • Re: can someone check the code for me.
    ... Rhino wrote: ... It would make sense to have people on this newsgroup critique the style and ... I did state in the body what specifics I was asking for. ... That is where we traditionally prefer that homework ...
    (comp.lang.java.programmer)