setokinto/slack-shogi

View on GitHub
app/kifu.py

Summary

Maintainability
A
45 mins
Test Coverage


class Kifu:
    
    def __init__(self):
        self.kifu = []
    
    def add(self, from_x, from_y, to_x, to_y, promote, koma):
        self.kifu.append((from_x, from_y, to_x, to_y, promote, koma))

    def pop(self):
        return self.kifu.pop()