阅读背景:

如果通过私有方法找到该元素的索引,如何将ArrayList的index0处的元素与另一个元素交换? (JAVA)

来源:互联网 

I'm trying to make a card game where one of the moves a player can take is a swap option, wherein it takes the card in play (the element at index0 of an ArrayList) and swaps it with another. The index of that other card is found through a private method calling a method from a different class that computes for the health*power of that card (and labeled as determiningPower). The card found with the highest determiningPower is swapped with the card at index0.I'm trying to make a card game where one of the




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: