<commit_before>#------------gui.py------------------------------------------------------------#
#
#            gui for academic terminal card game
#
# Purpose: This file has been created during the hack-a-thingie 2016 event and
#          will be using curses to create the terminal ui for playing the game.
#
#------------------------------------------------------------------------------#

import curses
import _curses

# Set up standard screen
stdscreen = curses.initscr()

# Inhibits typing to screen
curses.noecho()

# No need for enter to use commands
curses.cbreak()

# Setting up keypad usage
stdscreen.keypad(1)

begin_x = 20; begin_y = 7
height = 5; width = 40
win = curses.newwin(height, width, begin_y, begin_x)

# Defining corners
stdscreen.addch(0,0, curses.ACS_ULCORNER)
stdscreen.addch(23,0, curses.ACS_LLCORNER)
stdscreen.addch(0,78, curses.ACS_URCORNER)
stdscreen.addch(23,78, curses.ACS_LRCORNER)

# Defining borders
hline = 11
vline = 59
for i in range(1,79):
    stdscreen.addch(0,i, curses.ACS_HLINE)
    stdscreen.addch(23, i, curses.ACS_HLINE)
    if i < vline:
        stdscreen.addch(hline, i, curses.ACS_HLINE)
    if i <= 22:
        stdscreen.addch(i, 0, curses.ACS_VLINE)
        stdscreen.addch(i, 78, curses.ACS_VLINE)
        stdscreen.addch(i, vline, curses.ACS_VLINE)
    if i == vline:
        stdscreen.addch(0, vline, curses.ACS_TTEE)
        stdscreen.addch(23, vline, curses.ACS_BTEE)
    if i == hline:
        stdscreen.addch(i, 0, curses.ACS_LTEE)
        stdscreen.addch(i, vline, curses.ACS_RTEE)
        
stdscreen.getch()

# Terminating curses:
curses.nocbreak()
stdscreen.keypad(0)
curses.echo()
curses.endwin()
<commit_msg>Finishing skeleton for gui<commit_after>#------------gui.py------------------------------------------------------------#
#
#            gui for academic terminal card game
#
# Purpose: This file has been created during the hack-a-thingie 2016 event and
#          will be using curses to create the terminal ui for playing the game.
#
#------------------------------------------------------------------------------#

import curses
import _curses

# Set up standard screen
stdscreen = curses.initscr()

# Inhibits typing to screen
curses.noecho()

# No need for enter to use commands
curses.cbreak()

# Setting up keypad usage
stdscreen.keypad(1)

begin_x = 20; begin_y = 7
height = 5; width = 40
win = curses.newwin(height, width, begin_y, begin_x)

# Defining corners
stdscreen.addch(0,0, curses.ACS_ULCORNER)
stdscreen.addch(23,0, curses.ACS_LLCORNER)
stdscreen.addch(0,78, curses.ACS_URCORNER)
stdscreen.addch(23,78, curses.ACS_LRCORNER)

# Defining borders
center_hline = 11
vline = 59
for i in range(1,78):
    stdscreen.addch(0,i, curses.ACS_HLINE)
    stdscreen.addch(23, i, curses.ACS_HLINE)

    # Drawing hlines
    if i < vline:
        stdscreen.addch(center_hline, i, curses.ACS_HLINE)
        stdscreen.addch(21, i, curses.ACS_HLINE)
        stdscreen.addch(19, i, curses.ACS_HLINE)
        stdscreen.addch(2, i, curses.ACS_HLINE)
        stdscreen.addch(4, i, curses.ACS_HLINE)

    # Drawing vlines
    if i <= 22:
        stdscreen.addch(i, 0, curses.ACS_VLINE)
        stdscreen.addch(i, 78, curses.ACS_VLINE)
        stdscreen.addch(i, vline, curses.ACS_VLINE)

    # Adding corners Top and Bottom
    if i == vline:
        stdscreen.addch(0, vline, curses.ACS_TTEE)
        stdscreen.addch(23, vline, curses.ACS_BTEE)

    # Adding corners Left and Right
    if i == center_hline or i == 21 or i == 19 or i == 2 or i == 4:
        stdscreen.addch(i, 0, curses.ACS_LTEE)
        stdscreen.addch(i, vline, curses.ACS_RTEE)

        
stdscreen.getch()

# Terminating curses:
curses.nocbreak()
stdscreen.keypad(0)
curses.echo()
curses.endwin()

{'fraction_non_alphanumeric': 0.18001607286364854, 'fraction_numerical': 0.02625234395928208, 'mean_word_length': 2.454209065679926, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4051443', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1352, 'n_words': 323}