예제 #1
0
class TestAbilityCollection:
    """Unit tests for the AbilityCollection class"""

    def __init__(self):
        self.collection = None

    def setup(self):
        self.collection = AbilityCollection()

    def test_total_points_spent(self):
        self.collection.append(Ability("Strength", 10))
        self.collection.append(Ability("Dexterity", 10))
        assert self.collection.points_total == 4
예제 #2
0
 def setup(self):
     self.collection = AbilityCollection()
예제 #3
0
파일: main.py 프로젝트: ewingd/SagaBuilder
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SagaBuilder is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SagaBuilder.  If not, see <http://www.gnu.org/licenses/>.


from ui.SagaBuilderApp import SagaBuilderApp
from lib.Character import Character
from lib.Ability import Ability, AbilityCollection
from lib.SagaBuilderController import SagaBuilderController

if __name__ == "__main__":
    abilities = AbilityCollection()
    abilities.append(Ability('Strength', 8))
    abilities.append(Ability('Dexterity', 8))
    abilities.append(Ability('Constitution', 8))
    abilities.append(Ability('Intelligence', 8))
    abilities.append(Ability('Wisdom', 8))
    abilities.append(Ability('Charisma', 8))

    character = Character(abilities)
    controller = SagaBuilderController(character)
    App = SagaBuilderApp(character, controller)
    App.run()