Skip to content

Commit

Permalink
Adding files for ServerInterface.hpp and ClientInterface.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ZaneMODell committed Oct 2, 2023
1 parent 443e84e commit 0217208
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 1 deletion.
26 changes: 26 additions & 0 deletions source/Interfaces/NetWorth/client/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.19)
set(CMAKE_CXX_STANDARD 20)

project(client)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

include(FetchContent)
FetchContent_Declare(SFML
GIT_REPOSITORY https://github.com/SFML/SFML.git
GIT_TAG 2.6.x)
FetchContent_MakeAvailable(SFML)

add_executable(CMakeSFMLProject clientmain.cpp)
target_link_libraries(CMakeSFMLProject PRIVATE sfml-network)
target_compile_features(CMakeSFMLProject PRIVATE cxx_std_20)

if(WIN32)
add_custom_command(
TARGET CMakeSFMLProject
COMMENT "Copy OpenAL DLL"
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${SFML_SOURCE_DIR}/extlibs/bin/$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>,x64,x86>/openal32.dll $<TARGET_FILE_DIR:CMakeSFMLProject>
VERBATIM)
endif()

install(TARGETS CMakeSFMLProject)
35 changes: 35 additions & 0 deletions source/Interfaces/NetWorth/client/ClientInterface.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* This file is part of the Fall 2023, CSE 491 course project.
* @brief A networking interface that allows information to be sent across a network
* @note Status: PROTOTYPE
**/

#pragma once

#include <cassert>
#include <string>
#include <vector>
#include <SFML/Network/UdpSocket.hpp>
#include <SFML/Network/Packet.hpp>

#include "../NetworkInterface.hpp"

using namespace sf;

namespace cse491 {
namespace netWorth{
class ClientInterface : public NetworkingInterface {
private:

protected:


public:
ClientInterface(size_t id, const std::string & name) : NetworkingInterface(id, name) { }
~ClientInterface() = default;

}; //End of ClientInterface
}// End of namespace NetWorth


} // End of namespace cse491
32 changes: 32 additions & 0 deletions source/Interfaces/NetWorth/server/ServerInterface.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* This file is part of the Fall 2023, CSE 491 course project.
* @brief A networking interface that allows information to be sent across a network
* @note Status: PROTOTYPE
**/

#pragma once

#include <cassert>
#include <string>
#include <vector>
#include <SFML/Network/UdpSocket.hpp>
#include <SFML/Network/Packet.hpp>

#include "../NetworkInterface.hpp"

using namespace sf;

namespace cse491 {
namespace netWorth{
class ServerInterface : public NetworkingInterface {
private:

protected:


public:
ServerInterface(size_t id, const std::string & name) : NetworkingInterface(id, name) { }
~ServerInterface() = default;
};//End of class ServerInterface
}//End of namespace netWorth
} // End of namespace cse491
1 change: 0 additions & 1 deletion source/Interfaces/NetWorth/server/servermain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include<string>
#include<vector>
#include "../../../core/Data.hpp"
// #include "../core/InterfaceBase.hpp"
#include "../../TrashInterface.hpp"
#include "../../../Agents/PacingAgent.hpp"
#include "../../../Worlds/MazeWorld.hpp"
Expand Down

0 comments on commit 0217208

Please sign in to comment.