Event and Emit in Solidity

Hope all doing well.
I want to do the following TWO activities in the SOLIDITY code written below:-
An ASAP help will be highly appreciable.
Thanks with regards
Syed

Activities:-

Emit an event ScoreChanged with two arguments: int amount (equal to the value that was sent) and bool direction (true for up function and false for down).

Emit an event GameEnded after gameOver is switched to true

Solidity code:-

pragma solidity ^0.4.17;

contract TugOfWar {

int public score = 0;
int constant endAt = 1 ether;
bool public gameOver = false;

function up() external payable {
    require(msg.value > 0);
    require(!gameOver);

    int value = int(msg.value);
    score += value;

//
checkIfGameOver();
}

function down() external payable {
    require(msg.value > 0);
    require(!gameOver);

    int value = int(msg.value);
    score -= value;

//

    checkIfGameOver();
}

function checkIfGameOver() internal {
    if(score >= endAt || score <= endAt * -1) {
        gameOver = true;

        //
    }
}

}