Create an instance of the appropriate class when cloning.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3149 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: DropBoard.java,v 1.8 2004/08/29 06:50:47 mdb Exp $
|
// $Id: DropBoard.java,v 1.9 2004/10/20 00:16:39 mdb Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -740,10 +740,10 @@ public class DropBoard extends Board
|
|||||||
// documentation inherited
|
// documentation inherited
|
||||||
public Object clone ()
|
public Object clone ()
|
||||||
{
|
{
|
||||||
int size = _bwid*_bhei;
|
DropBoard board = (DropBoard)super.clone();
|
||||||
int[] data = new int[size];
|
board._board = new int[_board.length];
|
||||||
System.arraycopy(_board, 0, data, 0, size);
|
System.arraycopy(_board, 0, board._board, 0, _board.length);
|
||||||
return new DropBoard(data, _bwid, _bhei);
|
return board;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user