Compare commits
No commits in common. "17f5cf693b3e95ef427608dc8253ab81bf0fcce9" and "63dccf29facd55c5f82b5113da1644235c055601" have entirely different histories.
17f5cf693b
...
63dccf29fa
4
.gitignore
vendored
4
.gitignore
vendored
@ -10,7 +10,3 @@
|
|||||||
*.db
|
*.db
|
||||||
*.opensdf
|
*.opensdf
|
||||||
|
|
||||||
|
|
||||||
.idea/
|
|
||||||
|
|
||||||
.vs/
|
|
||||||
|
20
README.md
20
README.md
@ -1,21 +1 @@
|
|||||||
# Simulator
|
# Simulator
|
||||||
|
|
||||||
### This project provides a graphical interface that users can use to simulate the output from combinations of several inputs.
|
|
||||||
|
|
||||||
* Function of each button
|
|
||||||
1. `IN`: Generate an input block. Double click it to select the type of input.
|
|
||||||
2. `OUT`: Generate an output block.
|
|
||||||
3. `AND`: Generate an AND block, which performs function of logic and.
|
|
||||||
4. `OR`: Generate an OR block, which performs function of logic or.
|
|
||||||
5. `NOT`: Generate a NOT block, which performs function of logic not.
|
|
||||||
6. `Function`: Generate a function block. Double click it to select the type of operation to perform on two specific inputs.
|
|
||||||
7. `Line`: Enter line mode in which users can link blocks.
|
|
||||||
8. `Simulate`: Select a specific output block and simulate it.
|
|
||||||
9. `Grid`: Display the grid.
|
|
||||||
10. `Lock`: Turn on the lock mode to align the block to the grid.
|
|
||||||
11. `背景圖片`: Set the background image.
|
|
||||||
12. `背景顏色`: Set the background color.
|
|
||||||
13. `Open`: Load simulation file.
|
|
||||||
14. `Save`: Save simulation file.
|
|
||||||
|
|
||||||
![Image](https://github.com/Chen-Si-An/Simulator/blob/0e8094bb42173bca7fad5aeddffe74da7839e010/Simulator.gif)
|
|
||||||
|
BIN
Simulator.gif
BIN
Simulator.gif
Binary file not shown.
Before Width: | Height: | Size: 4.7 MiB |
@ -115,18 +115,12 @@ void CBlockAnd::SetBlkHead2Num (int iHeadBlkNum)
|
|||||||
|
|
||||||
double CBlockAnd::GetBlkValue () const
|
double CBlockAnd::GetBlkValue () const
|
||||||
{
|
{
|
||||||
if (m_pBlkHead1 != NULL && m_pBlkHead2 != NULL)
|
//And邏輯 (若兩輸入皆為1,則回傳1,否則回傳0)
|
||||||
{
|
if (abs (m_pBlkHead1->GetBlkValue () - 1) < TOLERANCE && abs (m_pBlkHead2->GetBlkValue () - 1) < TOLERANCE)
|
||||||
if (abs((int) (m_pBlkHead1->GetBlkValue () - 1)) < TOLERANCE && abs((int) (m_pBlkHead2->GetBlkValue () - 1)) < TOLERANCE)
|
|
||||||
{
|
|
||||||
return 1.;
|
return 1.;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
return 0.;
|
return 0.;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int CBlockAnd::GetValueFlag () const
|
int CBlockAnd::GetValueFlag () const
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[BgParameter]
|
[BgParameter]
|
||||||
BgPicBOOL=FALSE
|
BgPicBOOL=FALSE
|
||||||
BgPicPath=None
|
BgPicPath=None
|
||||||
BgColor=8454016
|
BgColor=65535
|
||||||
GridBOOL=FALSE
|
GridBOOL=TRUE
|
||||||
LockBOOL=FALSE
|
LockBOOL=TRUE
|
||||||
|
Binary file not shown.
@ -14,15 +14,15 @@
|
|||||||
<ProjectGuid>{C1F3E95D-9580-4550-A748-674E1D31DF84}</ProjectGuid>
|
<ProjectGuid>{C1F3E95D-9580-4550-A748-674E1D31DF84}</ProjectGuid>
|
||||||
<RootNamespace>TestSimulator</RootNamespace>
|
<RootNamespace>TestSimulator</RootNamespace>
|
||||||
<Keyword>MFCProj</Keyword>
|
<Keyword>MFCProj</Keyword>
|
||||||
<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<UseOfMfc>Static</UseOfMfc>
|
<UseOfMfc>Static</UseOfMfc>
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
@ -56,7 +56,6 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
Loading…
Reference in New Issue
Block a user