Skip to content

Commit

Permalink
painter_04
Browse files Browse the repository at this point in the history
  • Loading branch information
bacbahieu committed May 23, 2024
1 parent 37abd19 commit 8f77cb9
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 7 deletions.
Binary file not shown.
Binary file not shown.
Binary file modified AdvProg_L6-Painter/.vs/AdvProg_L6-Painter/v17/.wsuo
Binary file not shown.
Binary file modified AdvProg_L6-Painter/.vs/AdvProg_L6-Painter/v17/Browse.VC.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"RelativeDocumentMoniker": "painter.cpp",
"ToolTip": "D:\\code tung ngay\\AdvProg_AY2324\\AdvProg_L6-Painter\\painter.cpp",
"RelativeToolTip": "painter.cpp",
"ViewState": "AQIAAJUAAAAAAAAAAAAqwLAAAAAaAAAA",
"ViewState": "AQIAAC8AAAAAAAAAAAAqwE8AAAAPAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
"WhenOpened": "2024-05-01T16:35:55.088Z",
"EditorCaption": ""
Expand All @@ -67,8 +67,7 @@
"RelativeToolTip": "main.cpp",
"ViewState": "AQIAABsAAAAAAAAAAAAAACoAAAAZAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
"WhenOpened": "2024-05-23T13:02:54.482Z",
"EditorCaption": ""
"WhenOpened": "2024-05-23T13:02:54.482Z"
},
{
"$type": "Document",
Expand All @@ -80,8 +79,7 @@
"RelativeToolTip": "painter.h",
"ViewState": "AQIAABUAAAAAAAAAAAAAABAAAAAtAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
"WhenOpened": "2024-05-01T16:36:02.718Z",
"EditorCaption": ""
"WhenOpened": "2024-05-01T16:36:02.718Z"
}
]
}
Expand Down
Binary file not shown.
1 change: 0 additions & 1 deletion AdvProg_L6-Painter/.vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
"ExpandedNodes": [
""
],
"SelectedNode": "\\painter.cpp",
"PreviewInSolutionExplorer": false
}
Binary file modified AdvProg_L6-Painter/.vs/slnx.sqlite
Binary file not shown.
7 changes: 6 additions & 1 deletion AdvProg_L6-Painter/painter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ void Painter::turnLeft(double degree)
// TODO: rotate left the painter

angle += degree;

if (angle >= 360.0) {
angle -= 360.0;
}
}


Expand All @@ -74,6 +76,9 @@ void Painter::turnRight(double degree)
// TODO: rotate right the painter

angle -= degree;
if (angle <=0.0) {
angle += 360.0;
}
}

/***
Expand Down

0 comments on commit 8f77cb9

Please sign in to comment.