attack and win windows

also several refactorings