<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RpsGameForm
{

    public class RpsGame
    {
        // 입력 값(사용자가 선택한 값)
        public int UserSelect;

        // 처리 값(컴퓨터가 선택한 값)
        public int ComSelect;

        // 가위바위보 게임의 결과를 구한다.
        public Results Play(int UserSelect, int ComSelect)
        {
            Results GameResult = Results.None;    // 가위바위보 게임 결과

            if (UserSelect == ComSelect)
            {
                GameResult = Results.Draw;
            }
            else
            {
                switch (UserSelect)
                {
                    case 0: GameResult = (ComSelect == 2) ? Results.Win : Results.Lose; break;
                    case 1: GameResult = (ComSelect == 0) ? Results.Win : Results.Lose; break;
                    case 2: GameResult = (ComSelect == 1) ? Results.Win : Results.Lose; break;
                }
            }

            return GameResult;
        }

        // 가위바위보 게임 이벤트
        public delegate void GameEventHandler(GameEventArgs GameEventArgs);
        public event GameEventHandler GameResultEvent;
        private void FireGameResultEvent(GameEventArgs GameEventArgs)
        {
            if (GameResultEvent != null)
                GameResultEvent(GameEventArgs);
        }

        // 가위바위보 게임 이벤트를 실행한다.
        public void Run(GameEventArgs GameEventArgs)
        {
            Results GameResult = Play(GameEventArgs.UserSelect, GameEventArgs.ComSelect);
            GameEventArgs.SetGameResult(GameResult);

            FireGameResultEvent(GameEventArgs);
        }
    }

    public class GameEventArgs
    {
        public int UserSelect { get; private set; }
        public int ComSelect { get; private set; }
        public Results GameResult { get; private set; }

        public GameEventArgs(int m_UserSelect, int m_ComSelect)
        {
           UserSelect = m_UserSelect;
            ComSelect = m_ComSelect;
        }
        public GameEventArgs(int m_UserSelect, int m_ComSelect, Results m_GameResult)
        {
            UserSelect = m_UserSelect;
            ComSelect = m_ComSelect;
            GameResult = m_GameResult;
        }

        internal void SetGameResult(Results m_GameResult)
        {
            GameResult = m_GameResult;
        }
    }
}<commit_msg>코드 정리 및 수정<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RpsGameForm
{

    public class RpsGame
    {
        // 입력 값(사용자가 선택한 값)
        public int UserSelect;

        // 처리 값(컴퓨터가 선택한 값)
        public int ComSelect;

        // 가위바위보 게임의 결과를 구한다.
        public Results Play(int UserSelect, int ComSelect)
        {
            Results GameResult = Results.None;    // 가위바위보 게임 결과

            if (UserSelect == ComSelect)
            {
                GameResult = Results.Draw;
            }
            else
            {
                switch (UserSelect)
                {
                    case 0: GameResult = (ComSelect == 2) ? Results.Win : Results.Lose; break;
                    case 1: GameResult = (ComSelect == 0) ? Results.Win : Results.Lose; break;
                    case 2: GameResult = (ComSelect == 1) ? Results.Win : Results.Lose; break;
                }
            }

            return GameResult;
        }

        // 가위바위보 게임 이벤트
        public delegate void GameEventHandler(GameEventArgs GameEventArgs);
        public event GameEventHandler GameResultEvent;
        private void FireGameResultEvent(GameEventArgs GameEventArgs)
        {
            if (GameResultEvent != null)
                GameResultEvent(GameEventArgs);
        }

        // 가위바위보 게임 이벤트를 실행한다.
        public void Run(GameEventArgs GameEventArgs)
        {
            Results GameResult = Play(GameEventArgs.UserSelect, GameEventArgs.ComSelect);
            GameEventArgs.SetGameResult(GameResult);

            FireGameResultEvent(GameEventArgs);
        }
    }

    public class GameEventArgs
    {
        public int UserSelect { get; private set; }
        public int ComSelect { get; private set; }
        public Results GameResult { get; private set; }

        private GameEventArgs(int m_UserSelect, int m_ComSelect)
        {
           UserSelect = m_UserSelect;
            ComSelect = m_ComSelect;
        }
        private GameEventArgs(int m_UserSelect, int m_ComSelect, Results m_GameResult)
        {
            UserSelect = m_UserSelect;
            ComSelect = m_ComSelect;
            GameResult = m_GameResult;
        }

        public void SetGameResult(Results m_GameResult)
        {
            GameResult = m_GameResult;
        }
    }
}
{'fraction_non_alphanumeric': 0.07267380802352447, 'fraction_numerical': 0.002520478890989288, 'mean_word_length': 1.6843291995490417, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2913138', 'n_tokens_mistral': 1388, 'n_tokens_neox': 1454, 'n_words': 327}