發表文章

目前顯示的是 12月 21, 2018的文章

trying to call method I'm getting java.lang.IndexOutOfBoundsException

圖片
-1 I am trying to write a game on android, text quest. I have process called "work" what it does is giving player chance to choose work place and how much time he wants to work, then process this information. Below is code of two methods " checkWorkPlaces() " that checks if there are places to work in the city player are in, and then it calls " chooseWorkPlace() " method, that gives player chance to choose where he wants to work. tvInfo - TextView , I show all information on it. player - object of my custom class Player , that has such property as location of custom class Place , that has property name and workPlaces - array that contains work places of class WorkPlace , every one of those has definition and name property. answerContainer - just ArrayList that I use to p...